(window["bytedance_secsdk_captcha_jsonp_2.17.4"] = window["bytedance_secsdk_captcha_jsonp_2.17.4"] || []).push([[3], {
    440: function (e, t, n) {
        "use strict";
        n.r(t), n.d(t, "Collector", function () {
            return it
        });
        var i = function () {
            return (i = Object.assign || function (e) {
                for (var t, n = 1, i = arguments.length; n < i; n++) for (var r in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
                return e
            }).apply(this, arguments)
        };

        function r(e, t) {
            var n = {};
            for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
            if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
                var r = 0;
                for (i = Object.getOwnPropertySymbols(e); r < i.length; r++) t.indexOf(i[r]) < 0 && (n[i[r]] = e[i[r]])
            }
            return n
        }

        function o(e, t) {
            var n = "function" == typeof Symbol && e[Symbol.iterator];
            if (!n) return e;
            var i, r, o = n.call(e), a = [];
            try {
                for (; (void 0 === t || t-- > 0) && !(i = o.next()).done;) a.push(i.value)
            } catch (e) {
                r = {error: e}
            } finally {
                try {
                    i && !i.done && (n = o.return) && n.call(o)
                } finally {
                    if (r) throw r.error
                }
            }
            return a
        }

        function a() {
            for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(o(arguments[t]));
            return e
        }

        var s = function (e, t) {
            var n, i, r = function (e) {
                    var t = document.createElement("a");
                    return t.href = e, t
                }, o = window.screen.width, a = window.screen.height, s = window.navigator.appVersion,
                u = window.navigator.userAgent, c = window.navigator.language, l = document.referrer,
                d = l ? r(l).hostname : "", h = function (e) {
                    var t = r(e).search;
                    t = t.slice(1);
                    var n = {};
                    return t.split("&").forEach(function (e) {
                        var t, i, r = e.split("=");
                        r.length && (t = r[0], i = r[1]), i && (i = i.replace(/\%/g, "%25")), n[t] = decodeURIComponent(void 0 === i ? "" : i)
                    }), n
                }(window.location.href), f = "", p = "", v = "", g = "" + parseFloat(s);
            -1 !== (n = u.indexOf("Opera")) && (v = "Opera", g = u.substring(n + 6), -1 !== (n = u.indexOf("Version")) && (g = u.substring(n + 8))), -1 !== (n = u.indexOf("Edge")) ? (v = "Microsoft Edge", g = u.substring(n + 5)) : -1 !== (n = u.indexOf("MSIE")) ? (v = "Microsoft Internet Explorer", g = u.substring(n + 5)) : -1 !== u.indexOf("Chrome") ? -1 !== (n = u.indexOf("MicroMessenger")) ? (v = "weixin", g = u.substring(n + 15, n + 20)) : -1 !== (n = u.indexOf("MQQBrowser")) ? (v = "qqbrowser", g = u.substring(n + 11, n + 15)) : -1 !== (n = u.indexOf("Chrome")) && (v = "Chrome", g = u.substring(n + 7)) : -1 !== u.indexOf("Safari") ? -1 !== (n = u.indexOf("QQ")) ? (v = "qqbrowser", g = u.substring(n + 10, n + 16)) : -1 !== (n = u.indexOf("Safari")) && (v = "Safari", g = u.substring(n + 7), -1 !== (n = u.indexOf("Version")) && (g = u.substring(n + 8))) : -1 !== (n = u.indexOf("Firefox")) ? (v = "Firefox", g = u.substring(n + 8)) : -1 !== (n = u.indexOf("MicroMessenger")) ? (v = "weixin", g = u.substring(n + 15, n + 20)) : -1 !== (n = u.indexOf("QQ")) && (v = "qqbrowser", g = u.substring(n + 3, n + 8)), -1 !== (i = g.indexOf(";")) && (g = g.substring(0, i)), -1 !== (i = g.indexOf(" ")) && (g = g.substring(0, i)), -1 !== (i = g.indexOf(")")) && (g = g.substring(0, i));
            for (var m, _, z = /Mobile|htc|mini|Android|iP(ad|od|hone)/.test(s) ? "wap" : "web", y = [{
                s: "Windows 10",
                r: /(Windows 10.0|Windows NT 10.0)/
            }, {s: "Windows 8.1", r: /(Windows 8.1|Windows NT 6.3)/}, {
                s: "Windows 8",
                r: /(Windows 8|Windows NT 6.2)/
            }, {s: "Windows 7", r: /(Windows 7|Windows NT 6.1)/}, {s: "Android", r: /Android/}, {
                s: "Sun OS",
                r: /SunOS/
            }, {s: "Linux", r: /(Linux|X11)/}, {s: "iOS", r: /(iPhone|iPad|iPod)/}, {
                s: "Mac OS X",
                r: /Mac OS X/
            }, {s: "Mac OS", r: /(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/}], b = 0; b < y.length; b++) {
                var w = y[b];
                if (w.r.test(u)) {
                    f = w.s;
                    break
                }
            }

            function S(e, t) {
                var n = e.exec(t);
                return n && n[1] ? n[1] : ""
            }

            switch (/Windows/.test(f) && (p = S(/Windows (.*)/, f), f = "windows"), f) {
                case"Mac OS X":
                    p = S(/Mac OS X (10[\.\_\d]+)/, u), f = "mac";
                    break;
                case"Android":
                    (_ = S(/Android ([\.\_\d]+)/, m = u)) || (_ = S(/Android\/([\.\_\d]+)/, m)), p = _, f = "android";
                    break;
                case"iOS":
                    p = (p = /OS (\d+)_(\d+)_?(\d+)?/.exec(s)) ? p[1] + "." + p[2] + "." + (0 | p[3]) : "", f = "ios"
            }
            var E = e ? function () {
                var e = t ? "_tea_utm_cache_" + t : "_tea_utm_cache", n = {}, i = {
                    utm_source: h.utm_source,
                    utm_medium: h.utm_medium,
                    utm_campaign: h.utm_campaign,
                    utm_term: h.utm_term,
                    utm_content: h.utm_content
                };
                try {
                    var r = window.sessionStorage, o = !1;
                    for (var a in i) i[a] && (n[a] = i[a], o = !0);
                    if (o) r.setItem(e, JSON.stringify(n)); else {
                        var s = r.getItem(e);
                        s && (n = JSON.parse(s))
                    }
                } catch (e) {
                    return i
                }
                return n
            }() : {};
            return {
                browser: v,
                browser_version: g,
                platform: z,
                os_name: f,
                os_version: p,
                userAgent: u,
                screen_width: o,
                screen_height: a,
                device_model: function (e) {
                    var t = "";
                    try {
                        if ("android" === e) navigator.userAgent.split(";").forEach(function (e) {
                            e.indexOf("Build/") > -1 && (t = e.slice(0, e.indexOf("Build/")))
                        }); else if ("ios" === e || "mac" === e) {
                            var n = navigator.userAgent.replace("Mozilla/5.0 (", ""), i = n.indexOf(";");
                            t = n.slice(0, i)
                        }
                    } catch (e) {
                    }
                    return t.trim()
                }(f),
                language: c,
                referrer: l,
                referrer_host: d,
                utm_source: E.utm_source,
                utm_medium: E.utm_medium,
                utm_campaign: E.utm_campaign,
                utm_term: E.utm_term,
                utm_content: E.utm_content,
                isSupportBeacon: ("ios" !== f || "safari" !== v) && (!(!window.navigator || !window.navigator.sendBeacon) || void 0)
            }
        };

        function u(e, t) {
            return e(t = {exports: {}}, t.exports), t.exports
        }

        var c = u(function (e, t) {
                var n;
                n = function () {
                    function e() {
                        for (var e = 0, t = {}; e < arguments.length; e++) {
                            var n = arguments[e];
                            for (var i in n) t[i] = n[i]
                        }
                        return t
                    }

                    function t(e) {
                        return e.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent)
                    }

                    return function n(i) {
                        function r() {
                        }

                        function o(t, n, o) {
                            if ("undefined" != typeof document) {
                                "number" == typeof (o = e({path: "/"}, r.defaults, o)).expires && (o.expires = new Date(1 * new Date + 864e5 * o.expires)), o.expires = o.expires ? o.expires.toUTCString() : "";
                                try {
                                    var a = JSON.stringify(n);
                                    /^[\{\[]/.test(a) && (n = a)
                                } catch (e) {
                                }
                                n = i.write ? i.write(n, t) : encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent), t = encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent).replace(/[\(\)]/g, escape);
                                var s = "";
                                for (var u in o) o[u] && (s += "; " + u, !0 !== o[u] && (s += "=" + o[u].split(";")[0]));
                                return document.cookie = t + "=" + n + s
                            }
                        }

                        function a(e, n) {
                            if ("undefined" != typeof document) {
                                for (var r = {}, o = document.cookie ? document.cookie.split("; ") : [], a = 0; a < o.length; a++) {
                                    var s = o[a].split("="), u = s.slice(1).join("=");
                                    n || '"' !== u.charAt(0) || (u = u.slice(1, -1));
                                    try {
                                        var c = t(s[0]);
                                        if (u = (i.read || i)(u, c) || t(u), n) try {
                                            u = JSON.parse(u)
                                        } catch (e) {
                                        }
                                        if (r[c] = u, e === c) break
                                    } catch (e) {
                                    }
                                }
                                return e ? r[e] : r
                            }
                        }

                        return r.set = o, r.get = function (e) {
                            return a(e, !1)
                        }, r.getJSON = function (e) {
                            return a(e, !0)
                        }, r.remove = function (t, n) {
                            o(t, "", e(n, {expires: -1}))
                        }, r.defaults = {}, r.withConverter = n, r
                    }(function () {
                    })
                }, e.exports = n()
            }), l = function () {
                function e() {
                    this.cache = {}
                }

                return e.prototype.setItem = function (e, t) {
                    this.cache[e] = t
                }, e.prototype.getItem = function (e) {
                    return this.cache[e]
                }, e.prototype.removeItem = function (e) {
                    this.cache[e] = void 0
                }, e
            }(), d = {
                getItem: function (e) {
                    try {
                        var t = localStorage.getItem(e), n = t;
                        try {
                            t && "string" == typeof t && (n = JSON.parse(t))
                        } catch (e) {
                        }
                        return n || void 0
                    } catch (e) {
                    }
                }, setItem: function (e, t) {
                    try {
                        var n = "string" == typeof t ? t : JSON.stringify(t);
                        localStorage.setItem(e, n)
                    } catch (e) {
                    }
                }, removeItem: function (e) {
                    try {
                        localStorage.removeItem(e)
                    } catch (e) {
                    }
                }, getCookie: function (e) {
                    try {
                        var t = document.cookie.match(new RegExp("(?:^|;)\\s*" + e + "=([^;]+)")), n = t ? t[1] : "";
                        return decodeURIComponent(n)
                    } catch (e) {
                        return ""
                    }
                }, setCookie: function (e, t, n) {
                    try {
                        var i = +new Date + n;
                        c.set(e, t, {
                            expires: new Date(i),
                            path: "/",
                            domain: document.domain.split(".").slice(-2).join(".")
                        })
                    } catch (e) {
                    }
                }, isSupportLS: function () {
                    try {
                        return localStorage.setItem("_ranger-test-key", "hi"), localStorage.getItem("_ranger-test-key"), localStorage.removeItem("_ranger-test-key"), !0
                    } catch (W) {
                        return !1
                    }
                }()
            }, h = function () {
                function e(e) {
                    this._storage = !e && d.isSupportLS ? d : new l
                }

                return e.prototype.getItem = function (e) {
                    return this._storage.getItem(e)
                }, e.prototype.setItem = function (e, t) {
                    this._storage.setItem(e, t)
                }, e.prototype.getCookie = function (e) {
                    return this._storage.getCookie(e)
                }, e.prototype.setCookie = function (e, t, n) {
                    this._storage.setCookie(e, t, n)
                }, e.prototype.removeItem = function (e) {
                    this._storage.removeItem(e)
                }, e
            }(), f = function (e) {
                return function (e, t, n) {
                    if ("string" == typeof e && "number" == typeof n) {
                        var i, r = [];
                        n = n <= 25 ? n : n % 25;
                        var o = String.fromCharCode(n + 97);
                        i = e.split(o);
                        for (var a = 0; a < i.length; a++) {
                            var s = parseInt(i[a], n);
                            s = 1 * s ^ 64;
                            var u = String.fromCharCode(s);
                            r.push(u)
                        }
                        return r.join("")
                    }
                }(e, 0, 25)
            }, p = {
                cn: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az21z1lz21z21z1bz1iz4az1az1mz1k",
                sg: "1fz22z22z1nz21z4mz4bz4bz21z1ez18z1jz1gz49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",
                va: "1fz22z22z1nz21z4mz4bz4bz1kz18z1jz1gz24z18z49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k"
            }, v = "/v1/user/webid", g = "/v1/list",
            m = {NO_URL: 4001, IMG_ON: 4e3, IMG_CATCH: 4002, BEACON_FALSE: 4003, XHR_ON: 500, RESPONSE: 5001},
            _ = function (e, t) {
                return t ? "__tea_cache_tokens_" + e : "__tea_cache_events_" + e
            }, z = function () {
                if ("undefined" != typeof window) return window.TeaAnalyticsObject
            }, y = {
                cn: "1fz22z22z1nz21z4mz4bz4bz1bz1nz1nz20z1mz1dz1gz1jz1cz4az21z1lz21z21z1bz1iz4az1az1mz1k",
                sg: "1fz22z22z1nz21z4mz4bz4bz21z1ez18z1jz1gz49z1bz1nz1nz20z1mz1dz1gz1jz1cz4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",
                va: "1fz22z22z1nz21z4mz4bz4bz24z18z18z1jz1gz49z1bz1nz1nz20z1mz1dz1gz1jz1cz4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k"
            }, b = {
                cn: "1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",
                va: "1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",
                sg: "1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k"
            }, w = "__shushuo_libra_style__",
            S = ["1fz22z22z1nz21z4mz4bz4bz1bz18z22z18z4az19z27z22z1cz1bz18z1lz1az1cz4az1az1mz1k", "1fz22z22z1nz21z4mz4bz4bz25z25z25z4az19z27z22z1cz20z18z1lz1ez1cz20z21z4az1az1mz1k", "1fz22z22z1nz21z4mz4bz4bz1bz18z22z18z20z18z1lz1ez1cz20z21z4az1az1mz1kz4az1az1l", "1fz22z22z1nz21z4mz4bz4bz19z27z22z1cz20z18z1lz1ez1cz20z21z4az19z27z22z1cz1bz18z1lz1az1cz4az1az1mz1k"].map(function (e) {
                return f(e)
            });

        function E(e, t, n, i, r, o, a) {
            var s = new XMLHttpRequest;
            o && (s.timeout = o);
            var u = a || "POST";
            s.open(u, "" + e, !0), s.setRequestHeader("Content-Type", "application/json; charset=utf-8"), r && s.setRequestHeader("X-MCS-AppKey", "" + r), s.onload = function () {
                if (n) {
                    var e = null;
                    if (s.responseText) {
                        try {
                            e = JSON.parse(s.responseText)
                        } catch (t) {
                            e = {}
                        }
                        n(e)
                    }
                }
            }, o && (s.ontimeout = function () {
                i()
            }), s.onerror = function () {
                s.abort(), i && i(t, m.XHR_ON)
            }, s.send(JSON.stringify(t))
        }

        var k = function (e, t, n, i) {
            try {
                var r, o = e.match(/\/v\d\//);
                r = o ? o[0] : -1 !== e.indexOf("/v1/") ? "/v1/" : "/v2/";
                var a = e.split(r)[0];
                if (!a) return void i(e, t, m.NO_URL);
                t.forEach(function (r) {
                    var o = function (e) {
                        var t = "";
                        for (var n in e) e.hasOwnProperty(n) && void 0 !== e[n] && (t += "&" + n + "=" + encodeURIComponent(JSON.stringify(e[n])));
                        return "&" === t[0] ? t.slice(1) : t
                    }(r), s = new Image(1, 1);
                    s.onload = function () {
                        s = null, n && n()
                    }, s.onerror = function () {
                        s = null, i && i(e, t, m.IMG_ON)
                    }, s.src = a + "/v1/gif?" + o
                })
            } catch (n) {
                i && i(e, t, m.IMG_CATCH, n.message)
            }
        }, I = function (e, t, n, i, r, o, a, u) {
            var c = window.navigator.userAgent,
                l = -1 !== window.navigator.appName.indexOf("Microsoft Internet Explorer") && (-1 !== c.indexOf("MSIE 8.0") || -1 !== c.indexOf("MSIE 9.0")),
                d = !!n;
            if (!d && l) k(e, t, i, r); else if (!d && a) return s(!1).isSupportBeacon ? (u && u(), void (window.navigator.sendBeacon(e, JSON.stringify(t)) ? i() : r(e, t, m.BEACON_FALSE))) : void k(e, t, i, r);
            o && delete t.app_key, E(e, t, i, r, n)
        };

        function T(e) {
            return e ? (e ^ 16 * Math.random() >> e / 4).toString(10) : ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, T)
        }

        var x = function () {
                return T().replace(/-/g, "").slice(0, 19)
            }, C = function () {
                function e(e, t) {
                    this.browser = s(!0, e.app_id), this.config = e, this.cfg = t, this.storage = new h(!1), this.appInfo = e.app_key || e.app_id, this.isNoWebid = e.disable_webid, this.isNoSsid = e.disable_webid || e.disable_ssid, this.domain = e.channel_domain || f(p[e.channel]), this.tokenReady = !1, this.checkExp = e.checkExp || !1, this.enableCookie = e.cross_subdomain || !1, this.expiresTime = this.enableCookie ? 94608e6 : 0, this.fetchUrl = "" + this.domain + v
                }

                return e.prototype._getToken = function () {
                    this.tokensKey = _(this.appInfo, !0), this.cookieKey = "__tea_cookie_tokens_" + this.appInfo;
                    var e = this.storage.getItem(this.tokensKey);
                    if (this.enableCookie) {
                        var t = this.storage.getCookie(this.cookieKey);
                        if (t) {
                            t = decodeURIComponent(t);
                            var n = (t = JSON.parse(t)).user_unique_id, i = t.web_id, r = t.timestamp, o = t.ssid;
                            this._setToken(i, n, o, r)
                        } else {
                            if (!e) return void this._requestWebId();
                            this.storage.setCookie(this.cookieKey, encodeURIComponent(JSON.stringify(e)), this.expiresTime), this._checkLocal(e)
                        }
                    } else {
                        if (!e) return void this._requestWebId();
                        this._checkLocal(e)
                    }
                }, e.prototype._checkLocal = function (e) {
                    if (!e.web_id) {
                        var t = this.storage.getCookie("tt_webid"), n = this.storage.getCookie("__tea_sdk__ssid"),
                            i = this.storage.getCookie("__tea_sdk__user_unique_id");
                        if (t && n && i) {
                            var r = {web_id: t, ssid: n, user_unique_id: i, timestamp: Date.now()};
                            this.storage.setItem(this.tokensKey, r)
                        }
                    }
                    var o = this.storage.getItem(this.tokensKey), a = (i = o.user_unique_id, t = o.web_id, o.timestamp);
                    n = o.ssid, t && i ? this._setToken(t, i, n, a) : this._requestWebId()
                }, e.prototype._setToken = function (e, t, n, i) {
                    if (this.uuid = t, this.web_id = e, this.ssid = n, this.checkExp) {
                        var r = Date.now() - parseFloat(i);
                        if (r > 7344e6) return void this._requestWebId();
                        if (r > 432e7) return void this._updateWebId(e)
                    }
                    this._complete(e, t, n)
                }, e.prototype._complete = function (e, t, n) {
                    this.cfg.envInfo.user.ssid = n, this.cfg.envInfo.user.web_id = e, this.cfg.envInfo.user.user_unique_id = t, this.tokenReady = !0
                }, e.prototype._requestWebId = function () {
                    this.isNoWebid ? this._setwebId({web_id: x(), ssid: ""}) : this._fetchWebId(this.fetchUrl, !1)
                }, e.prototype._updateWebId = function (e) {
                    var t = "" + this.domain + v + "/" + e + "/update";
                    this._fetchWebId(t, !0)
                }, e.prototype._fetchWebId = function (e, t) {
                    var n = this;
                    this.isGetWebId = !0, I(e, {
                        app_key: this.config.app_key,
                        app_id: this.config.app_id,
                        url: location.href,
                        user_agent: this.browser.userAgent,
                        referer: this.browser.referrer,
                        user_unique_id: ""
                    }, this.config.app_key, function (e) {
                        if (e && 0 === e.e) if (t) {
                            var i = {web_id: n.web_id, ssid: n.ssid, user_unique_id: n.uuid, timestamp: Date.now()};
                            n.enableCookie && n.storage.setCookie(n.cookieKey, encodeURIComponent(JSON.stringify(i)), n.expiresTime), n.storage.setItem(n.tokensKey, i), n._complete(n.web_id, n.uuid, n.ssid), n.isGetSsid ? n._requestSsId() : n.callback && n.callback()
                        } else n.isGetWebId = !1, n._setwebId(e), n.isGetSsid ? n._requestSsId() : n.callback && n.callback(); else t ? n._fetchWebId(n.fetchUrl, !1) : n.isGetWebId = !1
                    }, function () {
                        n.isGetWebId = !1
                    }, !0)
                }, e.prototype._setwebId = function (e) {
                    var t = this.cfg.envInfo.user.web_id || e.web_id,
                        n = {web_id: t, ssid: e.ssid, user_unique_id: this._uuid ? this._uuid : t, timestamp: Date.now()};
                    this.enableCookie && this.storage.setCookie(this.cookieKey, encodeURIComponent(JSON.stringify(n)), this.expiresTime), this.storage.setItem(this.tokensKey, n), this.cfg.envInfo.user.ssid = e.ssid, this.cfg.envInfo.user.web_id = t, this.cfg.envInfo.user.user_unique_id = this._uuid ? this._uuid : t, this.uuid = this._uuid ? this._uuid : t, this.web_id = t, this.ssid = e.ssid, this.tokenReady = !0
                }, e.prototype._getSsid = function (e) {
                    e && -1 === ["0", "Null", "None", "", "undefined"].indexOf(e) && (this.uuid === e && this.web_id && this.ssid ? this.tokenReady = !0 : (this._uuid = e, this.uuid = e, this.cfg.envInfo.user.user_unique_id = e, this.isGetSsid = !0, this.isNoSsid || this.isGetWebId ? this.callback && this.callback() : (this.tokenReady = !1, this.isGetSsid = !1, this._requestSsId())))
                }, e.prototype._requestSsId = function () {
                    var e = this, t = this.domain + "/v1/user/ssid";
                    I(t, {
                        app_key: this.config.app_key,
                        app_id: this.config.app_id,
                        web_id: this.web_id,
                        user_unique_id: this.uuid
                    }, this.config.app_key, function (t) {
                        if (t && 0 === t.e) {
                            e.cfg.envInfo.user.ssid = t.ssid;
                            var n = {web_id: e.web_id, ssid: t.ssid, user_unique_id: e.uuid, timestamp: Date.now()};
                            e.enableCookie && e.storage.setCookie(e.cookieKey, encodeURIComponent(JSON.stringify(n)), e.expiresTime), e.storage.setItem(e.tokensKey, n), e.tokenReady = !0
                        } else e.tokenReady = !0;
                        e.callback && e.callback()
                    }, function () {
                        e.tokenReady = !0, e.callback && e.callback()
                    }, !0)
                }, e.prototype.isTokenReady = function () {
                    return this.tokenReady
                }, e
            }(), O = function (e, t, n) {
                void 0 === e && (e = []), void 0 === t && (t = function (e) {
                    return e
                }), void 0 === n && (n = 20);
                var i, r = [], o = 0;
                return e.forEach(function (e) {
                    var a = t(e);
                    void 0 === i ? i = a : (a !== i || r[o].length >= n) && (o += 1, i = a), r[o] = r[o] || [], r[o].push(e)
                }), r
            }, N = function () {
                function e(e, t, n, i, r) {
                    this.collect = e, this.cfg = n, this.config = t, this._token = i, this.appInfo = t.app_key || t.app_id, this.debugMode = !!t.log, this.evtDataKey = _(this.appInfo, !1);
                    var o = t.channel_domain || f(p[t.channel]);
                    this.reportUrl = t.report_url ? t.report_url : "" + o + g, this.storage = new h(!0), this.EventStorage = new h(!1), this.maxStorage = t.max_storage_num || -1, this.maxReport = t.max_report || 20;
                    var a = t.enable_storage, s = t.disable_storage;
                    this.closeStorage = !0, (a || !1 === s) && (this.closeStorage = !1), this.plugin = r, this.addListener()
                }

                return e.prototype.addListener = function () {
                    var e = this;
                    window.addEventListener("unload", function () {
                        e.report(!0)
                    }, !1), window.addEventListener("beforeunload", function () {
                        e.report(!0)
                    }, !1), document.addEventListener("visibilitychange", function () {
                        "hidden" === document.visibilityState && e.report(!0)
                    }, !1)
                }, e.prototype.setReady = function () {
                    this.isReady = !0, this.closeStorage || this.checkStorageEvent(), this.report()
                }, e.prototype.event = function (e, t) {
                    var n = this;
                    void 0 === e && (e = []), void 0 === t && (t = !1);
                    var i = this.storage.getItem(this.evtDataKey) || [], r = t ? a(e, i) : a(i, e);
                    this.storage.setItem(this.evtDataKey, r), this.reportTimer && clearTimeout(this.reportTimer), r.length >= this.maxReport ? this.report() : this.reportTimer = setTimeout(function () {
                        n.report(), n.reportTimer = null
                    }, 30)
                }, e.prototype.report = function (e) {
                    if (void 0 === e && (e = !1), !this.collect.destroyInstance && this._token.isTokenReady() && this.isReady) {
                        var t = this.storage.getItem(this.evtDataKey) || [], n = this._mergeEvents(t);
                        this.storage.removeItem(this.evtDataKey), this._dealData(n, e)
                    }
                }, e.prototype._mergeEvents = function (e) {
                    var t = this;
                    if (!e.length) return e;
                    var n = this.cfg.get();
                    return n.header.custom = JSON.stringify(n.header.custom), O(e, function (e) {
                        return !t.closeStorage && !!e.params.__disable_storage__
                    }, this.maxReport).map(function (e) {
                        return i({
                            events: e.map(function (e) {
                                var n = i({}, t.cfg.get("evtParams"), e.params);
                                return delete n.__disable_storage__, i({}, e, {params: JSON.stringify(n)})
                            }), user: n.user, header: n.header, verbose: t.debugMode ? 1 : void 0
                        }, t.closeStorage ? {} : {__disable_storage__: e[0].params.__disable_storage__})
                    })
                }, e.prototype._dealData = function (e, t) {
                    var n = this;
                    if (!e.length) return e;
                    var i = [];
                    i = O(e, function (e) {
                        return !!e.__disable_storage__
                    }, this.maxReport), this.closeStorage || this.plugin.maxStorage && this.plugin.maxStorage(i, this.maxStorage, this.evtDataKey, this.storage);
                    var r = {};
                    i.forEach(function (e) {
                        var i = x();
                        if (!n.closeStorage && !e[0].__disable_storage__) {
                            var o = JSON.parse(JSON.stringify(e));
                            o && o[0] && (o[0].header.__storage_index__ = Date.now()), r[i] = o, n.EventStorage.setItem(n.evtDataKey, r)
                        }
                        n._send(i, e, t)
                    })
                }, e.prototype._send = function (e, t, n) {
                    var i = this;
                    this.isSending = !0;
                    var r = function () {
                        i.isSending = !1
                    };
                    if (!this.closeStorage) try {
                        t && t[0] && t[0].header.__storage_index__ && delete (t = JSON.parse(JSON.stringify(t)))[0].header.__storage_index__
                    } catch (e) {
                    }
                    this.plugin && this.plugin.et_test && this.plugin.et_test.send(t), I(this.reportUrl, t, this.config.app_key, function () {
                        r();
                        var t = i.EventStorage.getItem(i.evtDataKey) || {};
                        Object.keys(t).length ? (delete t[e], i.EventStorage.setItem(i.evtDataKey, t)) : i.EventStorage.removeItem(i.evtDataKey)
                    }, function (e, t) {
                        r(), i.cfg.get("reportErrorCallback")(e, t), i.plugin && i.plugin.monitor && i.plugin.monitor.sdkError(i.config.app_key, i.reportUrl, e, t)
                    }, !1, n, r), this.plugin && this.plugin.monitor && this.plugin.monitor.sdkOnload(this.config.app_key, this.reportUrl, t)
                }, e.prototype.checkStorageEvent = function () {
                    var e = this;
                    try {
                        var t = this.EventStorage.getItem(this.evtDataKey) || {}, n = Object.keys(t);
                        n.length > 0 && setTimeout(function i() {
                            for (var r = [], o = 0; o < e.maxReport; o++) n.length > 0 && r.push(n.shift());
                            r.length > 0 && r.forEach(function (n) {
                                e._send(n, t[n], !1)
                            }), setTimeout(i, 5)
                        }, 5)
                    } catch (e) {
                    }
                }, e
            }(), A = void 0, D = (new Date).getTimezoneOffset(), L = parseInt("" + -D / 60, 10), q = 60 * D, P = "4.1.17",
            R = function () {
                function e(e, t) {
                    var n = s(!0, e);
                    this.initConfig = t, this.envInfo = {
                        user: {
                            user_unique_id: A,
                            user_type: A,
                            user_id: A,
                            user_is_auth: A,
                            user_is_login: A,
                            device_id: A,
                            web_id: A,
                            ip_addr_id: A,
                            ssid: A
                        },
                        header: {
                            app_id: A,
                            app_name: A,
                            app_install_id: A,
                            install_id: A,
                            app_package: A,
                            app_channel: A,
                            app_version: A,
                            os_name: n.os_name,
                            os_version: n.os_version,
                            device_model: n.device_model,
                            ab_client: A,
                            ab_version: A,
                            ab_sdk_version: A,
                            traffic_type: A,
                            client_ip: A,
                            device_brand: A,
                            os_api: A,
                            access: A,
                            language: n.language,
                            region: A,
                            app_language: A,
                            app_region: A,
                            creative_id: A,
                            ad_id: A,
                            campaign_id: A,
                            log_type: A,
                            rnd: A,
                            platform: n.platform,
                            sdk_version: P,
                            province: A,
                            city: A,
                            timezone: L,
                            tz_offset: q,
                            tz_name: A,
                            sim_region: A,
                            carrier: A,
                            resolution: n.screen_width + "x" + n.screen_height,
                            browser: n.browser,
                            browser_version: n.browser_version,
                            referrer: n.referrer,
                            referrer_host: n.referrer_host,
                            width: n.screen_width,
                            height: n.screen_height,
                            screen_width: n.screen_width,
                            screen_height: n.screen_height,
                            utm_term: n.utm_term,
                            utm_content: n.utm_content,
                            utm_source: n.utm_source,
                            utm_medium: n.utm_medium,
                            utm_campaign: n.utm_campaign,
                            custom: {}
                        }
                    }, this.evtParams = {}, this.reportErrorCallback = function () {
                    }
                }

                return e.prototype.set = function (e, t) {
                    var n = this;
                    if ("disable_auto_pv" !== e) if ("evtParams" === e || "_staging_flag" === e) {
                        var r;
                        r = "evtParams" === e ? t : {_staging_flag: Number(t)};
                        var o = i({}, r);
                        Object.keys(o).forEach(function (e) {
                            n.evtParams[e] = o[e]
                        })
                    } else if ("reportErrorCallback" === e && "function" == typeof t) this.reportErrorCallback = t; else {
                        var a = "";
                        if (e.indexOf(".") > -1) {
                            var s = e.split(".");
                            a = s[0], e = s[1]
                        }
                        if ("user_unique_id" === e) {
                            if (!t) return;
                            if (-1 !== ["0", "Null", "None", "", "undefined"].indexOf(t)) return
                        }
                        if ("os_version" === e && (e = "" + t), "web_id" === e) {
                            if (!t) return;
                            (!this.envInfo.user.user_unique_id || this.envInfo.user.user_unique_id && this.envInfo.user.user_unique_id === this.envInfo.user.web_id) && (this.envInfo.user.user_unique_id = t)
                        }
                        a ? "user" === a || "header" === a ? this.envInfo[a][e] = t : this.envInfo.header.custom[e] = t : this.envInfo.user.hasOwnProperty(e) ? ["user_type", "ip_addr_id"].indexOf(e) > -1 ? this.envInfo.user[e] = Number(t) : ["user_id", "web_id", "user_unique_id", "ssid"].indexOf(e) > -1 ? this.envInfo.user[e] = String(t) : ["user_is_auth", "user_is_login"].indexOf(e) > -1 ? this.envInfo.user[e] = Boolean(t) : "device_id" === e && (this.initConfig && this.initConfig.channel && "cn" === this.initConfig.channel ? this.envInfo.user[e] = t : this.envInfo.user[e] = Number(t)) : this.envInfo.header.hasOwnProperty(e) ? this.envInfo.header[e] = t : this.envInfo.header.custom[e] = t
                    }
                }, e.prototype.get = function (e) {
                    return e ? "evtParams" === e ? this.evtParams : "reportErrorCallback" === e ? this.reportErrorCallback : JSON.parse(JSON.stringify(this.envInfo[e])) : JSON.parse(JSON.stringify(this.envInfo))
                }, e
            }();

        function j() {
            return {title: document.title || location.pathname, url: location.href, url_path: location.pathname}
        }

        function V() {
            return Date.now()
        }

        function M() {
            var e = z();
            return window[e] ? window[e].l : V()
        }

        function B() {
            var e = !1;
            return ["hidden", "msHidden", "webkitHidden"].forEach(function (t) {
                void 0 !== document[t] && (e = !0)
            }), e
        }

        var H, W, U = function () {
            function e(e) {
                var t = this;
                this._sendEvent = function (e) {
                    void 0 === e && (e = !1);
                    var n = e ? t.options.aliveDTime : V() - t.sessionStartTime;
                    V() - t.pageStartTime > t.options.maxDuration || (t.event("predefine_page_alive", i({}, j(), {
                        duration: n,
                        is_support_visibility_change: t.options.sup_vis_change ? 1 : 0
                    })), t.sessionStartTime = V())
                }, this._setUpTimer = function () {
                    return t.timerHandler && clearInterval(t.timerHandler), setInterval(function () {
                        V() - t.sessionStartTime > t.options.aliveDTime && t._sendEvent(!0)
                    }, 1e3)
                }, this._visibilitychange = function () {
                    "hidden" === document.visibilityState ? t.timerHandler && (clearInterval(t.timerHandler), t._sendEvent()) : "visible" === document.visibilityState && (t.sessionStartTime = V(), t.timerHandler = t._setUpTimer())
                }, this._beforeunload = function () {
                    document.hidden || t._sendEvent()
                }, this._wtest = function () {
                    document.getElementById("wtest").innerHTML = "visibilitychange"
                }, this._dtest = function () {
                    document.getElementById("dtest").innerHTML = "dvisibilitychange"
                }, this.event = e, this.isSupVisChange = B(), this.options = {
                    maxDuration: 432e5,
                    aliveDTime: 6e4,
                    sup_vis_change: B()
                }, this.pageStartTime = M(), this.sessionStartTime = this.pageStartTime, this.timerHandler = null, this.disableCallback = function () {
                }
            }

            return e.prototype.enable = function () {
                this.disableCallback = this._enablePageAlive()
            }, e.prototype.disable = function () {
                this.disableCallback(), this.pageStartTime = Date.now()
            }, e.prototype._enablePageAlive = function () {
                var e = this;
                return this.timerHandler = this._setUpTimer(), document.addEventListener("visibilitychange", this._visibilitychange), window.addEventListener("beforeunload", this._beforeunload), function () {
                    e._beforeunload(), document.removeEventListener("visibilitychange", e._visibilitychange), window.removeEventListener("beforeunload", e._beforeunload)
                }
            }, e
        }(), J = function () {
            function e(e) {
                var t = this;
                this._visibilitychange = function () {
                    "hidden" === document.visibilityState ? t.activeEndTime = V() : "visible" === document.visibilityState && (t.activeEndTime && (t.totalTime += t.activeEndTime - t.activeStartTime, t.activeTimes += 1), t.activeEndTime = void 0, t.activeStartTime = V())
                }, this._beforeunload = function () {
                    t.totalTime += (t.activeEndTime || V()) - t.activeStartTime, t._sendEventPageClose()
                }, this.event = e, this.isSupVisChange = B(), this.options = {sup_vis_change: this.isSupVisChange}, this.disableCallback = function () {
                }, this.pageStartTime = M(), this._resetData()
            }

            return e.prototype.enable = function () {
                this.disableCallback = this._enablePageClose()
            }, e.prototype.disable = function () {
                this.disableCallback()
            }, e.prototype._resetData = function () {
                this.activeStartTime = void 0 === this.activeStartTime ? M() : Date.now(), this.activeEndTime = void 0, this.activeTimes = 1, this.totalTime = 0
            }, e.prototype._sendEventPageClose = function () {
                var e = V() - this.pageStartTime;
                this.event("predefine_page_close", i({}, j(), {
                    active_times: this.activeTimes,
                    duration: this.totalTime,
                    total_duration: e,
                    is_support_visibility_change: this.options.sup_vis_change ? 1 : 0
                })), this.pageStartTime = Date.now(), this._resetData()
            }, e.prototype._enablePageClose = function () {
                var e = this;
                return document.addEventListener("visibilitychange", this._visibilitychange), window.addEventListener("beforeunload", this._beforeunload), function () {
                    e._beforeunload(), document.removeEventListener("visibilitychange", e._visibilitychange), window.removeEventListener("beforeunload", e._beforeunload)
                }
            }, e
        }(), F = function () {
            function e(e) {
                this.pageAlive = new U(e), this.pageClose = new J(e), this._enable()
            }

            return e.prototype._enable = function () {
                this.pageAlive.enable(), this.pageClose.enable()
            }, e.prototype._disable = function () {
                this.pageAlive.disable(), this.pageClose.disable()
            }, e.prototype.reset = function () {
                this._disable(), this._enable()
            }, e
        }(), $ = function () {
            function e(e) {
                var t = this;
                this._setInterval = function () {
                    t._clearIntervalFunc = function (e, t) {
                        void 0 === e && (e = function () {
                        }), void 0 === t && (t = 1e3);
                        var n, i = Date.now() + t;
                        return n = window.setTimeout(function r() {
                            var o = Date.now() - i;
                            e(), i += t, n = window.setTimeout(r, Math.max(0, t - o))
                        }, t), function () {
                            window.clearTimeout(n)
                        }
                    }(function () {
                        t._isSessionhasEvent && t._endCurrentSession()
                    }, t.sessionInterval)
                }, this._clearInterval = function () {
                    t._clearIntervalFunc && t._clearIntervalFunc()
                }, this.sessionInterval = 6e4, this._eventSenderFunc = e, this._startTime = 0, this._lastTime = 0, this._setInterval()
            }

            return e.prototype._endCurrentSession = function () {
                this._eventSenderFunc("_be_active", {
                    start_time: this._startTime,
                    end_time: this._lastTime,
                    url: window.location.href,
                    referrer: window.document.referrer
                }), this._isSessionhasEvent = !1, this._startTime = 0
            }, e.prototype.process = function () {
                this._isSessionhasEvent || (this._isSessionhasEvent = !0, this._startTime = +new Date);
                var e = this._lastTime || +new Date;
                this._lastTime = +new Date, this._lastTime - e > this.sessionInterval && (this._clearInterval(), this._endCurrentSession(), this._setInterval())
            }, e
        }();
        (W = H || (H = {})).Normal = "synchronize", W.Once = "setOnce";
        var K = function () {
            function e(e) {
                var t, n = e.instance, i = e.appId, r = e.channel, o = e.app_key;
                this.instance = n, this.appId = i, this.app_key = o, this.channel = r, this.domain = this.getDomain(), this.urls = ((t = {})[H.Normal] = this.getUrl(H.Normal), t[H.Once] = this.getUrl(H.Once), t), this.autoId = 0, this.lastId = 0, this.lastOnceId = 0, this.duration = 1e4, this.data = null
            }

            return e.prototype.getDomain = function () {
                return f(y[this.channel].replace(/\/+$/, ""))
            }, e.prototype.getUrl = function (e) {
                return this.domain + "/service/api/v3/userprofile/" + this.appId + "/" + e
            }, e.prototype.getData = function (e) {
                void 0 === e && (e = {});
                var t = this.instance._config.get(), n = t.user, o = t.header, a = (o.headers, o.custom),
                    s = r(o, ["headers", "custom"]);
                return {
                    user: {web_id: n.web_id, ssid: n.ssid, user_unique_id: n.user_unique_id},
                    header: i({}, s || {}),
                    profile: i({}, a || {}, e || {})
                }
            }, e.prototype.start = function () {
                var e = this;
                this.autoId > 0 || (this.upPre(H.Normal), this.autoId = window.setInterval(function () {
                    e.upPre(H.Normal)
                }, this.duration))
            }, e.prototype.stop = function () {
                this.autoId > 0 && window.clearInterval(this.autoId)
            }, e.prototype.setProfile = function (e) {
                var t = Date.now();
                (!this.lastId || t - this.lastId >= this.duration) && (this.instance.config(e), this.upPre(H.Normal, e), this.lastId = t)
            }, e.prototype.setOnceProfile = function (e) {
                var t = Date.now();
                (!this.lastOnceId || t - this.lastOnceId >= this.duration) && (this.instance.config(e), this.upPre(H.Once, e), this.lastOnceId = t)
            }, e.prototype.upPre = function (e, t) {
                void 0 === t && (t = {});
                var n = this.getData(t);
                this.data && JSON.stringify(this.data) === JSON.stringify(n) || (this.up(this.urls[e], n), this.data = n)
            }, e.prototype.up = function (e, t) {
                I(e, t)
            }, e
        }(), G = function () {
            function e() {
            }

            return e.prototype.sdkOnload = function (e, t, n) {
                if (!this.sdkReady) {
                    this.sdkReady = !0;
                    try {
                        if (0 === n.length) return;
                        var i = n[0], r = i.header, o = i.user, a = r.app_id, s = r.app_name, u = r.sdk_version,
                            c = o.web_id, l = {
                                events: [{
                                    event: "onload",
                                    params: JSON.stringify({app_key: e, app_id: a, app_name: s || "", sdk_version: u}),
                                    local_time_ms: Date.now()
                                }], user: {user_unique_id: c}, header: {}
                            };
                        setTimeout(function () {
                            I(t, [l], "566f58151b0ed37e")
                        }, 16)
                    } catch (e) {
                    }
                }
            }, e.prototype.sdkError = function (e, t, n, i) {
                try {
                    var r = n[0], o = r.user, a = r.header, s = [];
                    n.forEach(function (e) {
                        e.events.forEach(function (e) {
                            s.push(e)
                        })
                    });
                    var u = {
                        events: s.map(function (t) {
                            return {
                                event: "on_error",
                                params: JSON.stringify({
                                    error_code: i,
                                    app_key: e,
                                    app_id: a.app_id,
                                    app_name: a.app_name || "",
                                    error_event: t.event,
                                    local_time_ms: t.local_time_ms,
                                    tea_event_index: Date.now(),
                                    params: t.params,
                                    header: JSON.stringify(a),
                                    user: JSON.stringify(o)
                                }),
                                local_time_ms: Date.now()
                            }
                        }), user: {user_unique_id: o.user_unique_id}, header: {}
                    };
                    setTimeout(function () {
                        I(t, [u], "566f58151b0ed37e")
                    }, 16)
                } catch (e) {
                }
            }, e
        }(), Q = function () {
            var e = null;
            if (parent !== window) try {
                e = parent.location.href
            } catch (r) {
                e = document.referrer
            }
            return e
        }, X = new h(!1), Y = function (e) {
            return "__tea_sdk_ab_version_" + e
        }, Z = function (e) {
            var t = {ab_version: [], data: null, timestamp: +new Date};
            try {
                t = X.getItem(Y(e)) || t
            } catch (e) {
            }
            return t
        }, ee = function (e, t) {
            try {
                var n = Z(e);
                X.setItem(Y(e), i({}, n, t))
            } catch (W) {
            }
        }, te = u(function (e) {
            !function (t) {
                var n, i, r, o, a, s, u, c, l, d, h, f, p, v, g, m, _, z, y, b = "sizzle" + 1 * new Date,
                    w = t.document, S = 0, E = 0, k = ce(), I = ce(), T = ce(), x = ce(), C = function (e, t) {
                        return e === t && (h = !0), 0
                    }, O = {}.hasOwnProperty, N = [], A = N.pop, D = N.push, L = N.push, q = N.slice, P = function (e, t) {
                        for (var n = 0, i = e.length; n < i; n++) if (e[n] === t) return n;
                        return -1
                    },
                    R = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
                    j = "[\\x20\\t\\r\\n\\f]",
                    V = "(?:\\\\[\\da-fA-F]{1,6}" + j + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
                    M = "\\[" + j + "*(" + V + ")(?:" + j + "*([*^$|!~]?=)" + j + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + V + "))|)" + j + "*\\]",
                    B = ":(" + V + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + M + ")*)|.*)\\)|)",
                    H = new RegExp(j + "+", "g"),
                    W = new RegExp("^" + j + "+|((?:^|[^\\\\])(?:\\\\.)*)" + j + "+$", "g"),
                    U = new RegExp("^" + j + "*," + j + "*"), J = new RegExp("^" + j + "*([>+~]|" + j + ")" + j + "*"),
                    F = new RegExp(j + "|>"), $ = new RegExp(B), K = new RegExp("^" + V + "$"), G = {
                        ID: new RegExp("^#(" + V + ")"),
                        CLASS: new RegExp("^\\.(" + V + ")"),
                        TAG: new RegExp("^(" + V + "|[*])"),
                        ATTR: new RegExp("^" + M),
                        PSEUDO: new RegExp("^" + B),
                        CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + j + "*(even|odd|(([+-]|)(\\d*)n|)" + j + "*(?:([+-]|)" + j + "*(\\d+)|))" + j + "*\\)|)", "i"),
                        bool: new RegExp("^(?:" + R + ")$", "i"),
                        needsContext: new RegExp("^" + j + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + j + "*((?:-\\d)?\\d*)" + j + "*\\)|)(?=[^-]|$)", "i")
                    }, Q = /HTML$/i, X = /^(?:input|select|textarea|button)$/i, Y = /^h\d$/i, Z = /^[^{]+\{\s*\[native \w/,
                    ee = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, te = /[+~]/,
                    ne = new RegExp("\\\\[\\da-fA-F]{1,6}" + j + "?|\\\\([^\\r\\n\\f])", "g"), ie = function (e, t) {
                        var n = "0x" + e.slice(1) - 65536;
                        return t || (n < 0 ? String.fromCharCode(n + 65536) : String.fromCharCode(n >> 10 | 55296, 1023 & n | 56320))
                    }, re = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, oe = function (e, t) {
                        return t ? "\0" === e ? "" : e.slice(0, -1) + "\\" + e.charCodeAt(e.length - 1).toString(16) + " " : "\\" + e
                    }, ae = function () {
                        f()
                    }, se = ze(function (e) {
                        return !0 === e.disabled && "fieldset" === e.nodeName.toLowerCase()
                    }, {dir: "parentNode", next: "legend"});
                try {
                    L.apply(N = q.call(w.childNodes), w.childNodes), N[w.childNodes.length].nodeType
                } catch (t) {
                    L = {
                        apply: N.length ? function (e, t) {
                            D.apply(e, q.call(t))
                        } : function (e, t) {
                            for (var n = e.length, i = 0; e[n++] = t[i++];) ;
                            e.length = n - 1
                        }
                    }
                }

                function ue(e, t, n, r) {
                    var o, a, u, l, d, h, v, _ = t && t.ownerDocument, z = t ? t.nodeType : 9;
                    if (n = n || [], "string" != typeof e || !e || 1 !== z && 9 !== z && 11 !== z) return n;
                    if (!r && (f(t), t = t || p, g)) {
                        if (11 !== z && (d = ee.exec(e))) if (o = d[1]) {
                            if (9 === z) {
                                if (!(u = t.getElementById(o))) return n;
                                if (u.id === o) return n.push(u), n
                            } else if (_ && (u = _.getElementById(o)) && y(t, u) && u.id === o) return n.push(u), n
                        } else {
                            if (d[2]) return L.apply(n, t.getElementsByTagName(e)), n;
                            if ((o = d[3]) && i.getElementsByClassName && t.getElementsByClassName) return L.apply(n, t.getElementsByClassName(o)), n
                        }
                        if (i.qsa && !x[e + " "] && (!m || !m.test(e)) && (1 !== z || "object" !== t.nodeName.toLowerCase())) {
                            if (v = e, _ = t, 1 === z && (F.test(e) || J.test(e))) {
                                for ((_ = te.test(e) && ge(t.parentNode) || t) === t && i.scope || ((l = t.getAttribute("id")) ? l = l.replace(re, oe) : t.setAttribute("id", l = b)), a = (h = s(e)).length; a--;) h[a] = (l ? "#" + l : ":scope") + " " + _e(h[a]);
                                v = h.join(",")
                            }
                            try {
                                return L.apply(n, _.querySelectorAll(v)), n
                            } catch (t) {
                                x(e, !0)
                            } finally {
                                l === b && t.removeAttribute("id")
                            }
                        }
                    }
                    return c(e.replace(W, "$1"), t, n, r)
                }

                function ce() {
                    var e = [];
                    return function t(n, i) {
                        return e.push(n + " ") > r.cacheLength && delete t[e.shift()], t[n + " "] = i
                    }
                }

                function le(e) {
                    return e[b] = !0, e
                }

                function de(e) {
                    var t = p.createElement("fieldset");
                    try {
                        return !!e(t)
                    } catch (e) {
                        return !1
                    } finally {
                        t.parentNode && t.parentNode.removeChild(t), t = null
                    }
                }

                function he(e, t) {
                    for (var n = e.split("|"), i = n.length; i--;) r.attrHandle[n[i]] = t
                }

                function fe(e, t) {
                    var n = t && e, i = n && 1 === e.nodeType && 1 === t.nodeType && e.sourceIndex - t.sourceIndex;
                    if (i) return i;
                    if (n) for (; n = n.nextSibling;) if (n === t) return -1;
                    return e ? 1 : -1
                }

                function pe(e) {
                    return function (t) {
                        return "form" in t ? t.parentNode && !1 === t.disabled ? "label" in t ? "label" in t.parentNode ? t.parentNode.disabled === e : t.disabled === e : t.isDisabled === e || t.isDisabled !== !e && se(t) === e : t.disabled === e : "label" in t && t.disabled === e
                    }
                }

                function ve(e) {
                    return le(function (t) {
                        return t = +t, le(function (n, i) {
                            for (var r, o = e([], n.length, t), a = o.length; a--;) n[r = o[a]] && (n[r] = !(i[r] = n[r]))
                        })
                    })
                }

                function ge(e) {
                    return e && void 0 !== e.getElementsByTagName && e
                }

                for (n in i = ue.support = {}, a = ue.isXML = function (e) {
                    var t = e.namespaceURI, n = (e.ownerDocument || e).documentElement;
                    return !Q.test(t || n && n.nodeName || "HTML")
                }, f = ue.setDocument = function (e) {
                    var t, n, o = e ? e.ownerDocument || e : w;
                    return o != p && 9 === o.nodeType && o.documentElement ? (v = (p = o).documentElement, g = !a(p), w != p && (n = p.defaultView) && n.top !== n && (n.addEventListener ? n.addEventListener("unload", ae, !1) : n.attachEvent && n.attachEvent("onunload", ae)), i.scope = de(function (e) {
                        return v.appendChild(e).appendChild(p.createElement("div")), void 0 !== e.querySelectorAll && !e.querySelectorAll(":scope fieldset div").length
                    }), i.attributes = de(function (e) {
                        return e.className = "i", !e.getAttribute("className")
                    }), i.getElementsByTagName = de(function (e) {
                        return e.appendChild(p.createComment("")), !e.getElementsByTagName("*").length
                    }), i.getElementsByClassName = Z.test(p.getElementsByClassName), i.getById = de(function (e) {
                        return v.appendChild(e).id = b, !p.getElementsByName || !p.getElementsByName(b).length
                    }), i.getById ? (r.filter.ID = function (e) {
                        var t = e.replace(ne, ie);
                        return function (e) {
                            return e.getAttribute("id") === t
                        }
                    }, r.find.ID = function (e, t) {
                        if (void 0 !== t.getElementById && g) {
                            var n = t.getElementById(e);
                            return n ? [n] : []
                        }
                    }) : (r.filter.ID = function (e) {
                        var t = e.replace(ne, ie);
                        return function (e) {
                            var n = void 0 !== e.getAttributeNode && e.getAttributeNode("id");
                            return n && n.value === t
                        }
                    }, r.find.ID = function (e, t) {
                        if (void 0 !== t.getElementById && g) {
                            var n, i, r, o = t.getElementById(e);
                            if (o) {
                                if ((n = o.getAttributeNode("id")) && n.value === e) return [o];
                                for (r = t.getElementsByName(e), i = 0; o = r[i++];) if ((n = o.getAttributeNode("id")) && n.value === e) return [o]
                            }
                            return []
                        }
                    }), r.find.TAG = i.getElementsByTagName ? function (e, t) {
                        return void 0 !== t.getElementsByTagName ? t.getElementsByTagName(e) : i.qsa ? t.querySelectorAll(e) : void 0
                    } : function (e, t) {
                        var n, i = [], r = 0, o = t.getElementsByTagName(e);
                        if ("*" === e) {
                            for (; n = o[r++];) 1 === n.nodeType && i.push(n);
                            return i
                        }
                        return o
                    }, r.find.CLASS = i.getElementsByClassName && function (e, t) {
                        if (void 0 !== t.getElementsByClassName && g) return t.getElementsByClassName(e)
                    }, _ = [], m = [], (i.qsa = Z.test(p.querySelectorAll)) && (de(function (e) {
                        var t;
                        v.appendChild(e).innerHTML = "<a id='" + b + "'></a><select id='" + b + "-\r\\' msallowcapture=''><option selected=''></option></select>", e.querySelectorAll("[msallowcapture^='']").length && m.push("[*^$]=" + j + "*(?:''|\"\")"), e.querySelectorAll("[selected]").length || m.push("\\[" + j + "*(?:value|" + R + ")"), e.querySelectorAll("[id~=" + b + "-]").length || m.push("~="), (t = p.createElement("input")).setAttribute("name", ""), e.appendChild(t), e.querySelectorAll("[name='']").length || m.push("\\[" + j + "*name" + j + "*=" + j + "*(?:''|\"\")"), e.querySelectorAll(":checked").length || m.push(":checked"), e.querySelectorAll("a#" + b + "+*").length || m.push(".#.+[+~]"), e.querySelectorAll("\\\f"), m.push("[\\r\\n\\f]")
                    }), de(function (e) {
                        e.innerHTML = "<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";
                        var t = p.createElement("input");
                        t.setAttribute("type", "hidden"), e.appendChild(t).setAttribute("name", "D"), e.querySelectorAll("[name=d]").length && m.push("name" + j + "*[*^$|!~]?="), 2 !== e.querySelectorAll(":enabled").length && m.push(":enabled", ":disabled"), v.appendChild(e).disabled = !0, 2 !== e.querySelectorAll(":disabled").length && m.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"), m.push(",.*:")
                    })), (i.matchesSelector = Z.test(z = v.matches || v.webkitMatchesSelector || v.mozMatchesSelector || v.oMatchesSelector || v.msMatchesSelector)) && de(function (e) {
                        i.disconnectedMatch = z.call(e, "*"), z.call(e, "[s!='']:x"), _.push("!=", B)
                    }), m = m.length && new RegExp(m.join("|")), _ = _.length && new RegExp(_.join("|")), t = Z.test(v.compareDocumentPosition), y = t || Z.test(v.contains) ? function (e, t) {
                        var n = 9 === e.nodeType ? e.documentElement : e, i = t && t.parentNode;
                        return e === i || !(!i || 1 !== i.nodeType || !(n.contains ? n.contains(i) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(i)))
                    } : function (e, t) {
                        if (t) for (; t = t.parentNode;) if (t === e) return !0;
                        return !1
                    }, C = t ? function (e, t) {
                        if (e === t) return h = !0, 0;
                        var n = !e.compareDocumentPosition - !t.compareDocumentPosition;
                        return n || (1 & (n = (e.ownerDocument || e) == (t.ownerDocument || t) ? e.compareDocumentPosition(t) : 1) || !i.sortDetached && t.compareDocumentPosition(e) === n ? e == p || e.ownerDocument == w && y(w, e) ? -1 : t == p || t.ownerDocument == w && y(w, t) ? 1 : d ? P(d, e) - P(d, t) : 0 : 4 & n ? -1 : 1)
                    } : function (e, t) {
                        if (e === t) return h = !0, 0;
                        var n, i = 0, r = e.parentNode, o = t.parentNode, a = [e], s = [t];
                        if (!r || !o) return e == p ? -1 : t == p ? 1 : r ? -1 : o ? 1 : d ? P(d, e) - P(d, t) : 0;
                        if (r === o) return fe(e, t);
                        for (n = e; n = n.parentNode;) a.unshift(n);
                        for (n = t; n = n.parentNode;) s.unshift(n);
                        for (; a[i] === s[i];) i++;
                        return i ? fe(a[i], s[i]) : a[i] == w ? -1 : s[i] == w ? 1 : 0
                    }, p) : p
                }, ue.matches = function (e, t) {
                    return ue(e, null, null, t)
                }, ue.matchesSelector = function (e, t) {
                    if (f(e), i.matchesSelector && g && !x[t + " "] && (!_ || !_.test(t)) && (!m || !m.test(t))) try {
                        var n = z.call(e, t);
                        if (n || i.disconnectedMatch || e.document && 11 !== e.document.nodeType) return n
                    } catch (e) {
                        x(t, !0)
                    }
                    return ue(t, p, null, [e]).length > 0
                }, ue.contains = function (e, t) {
                    return (e.ownerDocument || e) != p && f(e), y(e, t)
                }, ue.attr = function (e, t) {
                    (e.ownerDocument || e) != p && f(e);
                    var n = r.attrHandle[t.toLowerCase()],
                        o = n && O.call(r.attrHandle, t.toLowerCase()) ? n(e, t, !g) : void 0;
                    return void 0 !== o ? o : i.attributes || !g ? e.getAttribute(t) : (o = e.getAttributeNode(t)) && o.specified ? o.value : null
                }, ue.escape = function (e) {
                    return (e + "").replace(re, oe)
                }, ue.error = function (e) {
                    throw new Error("Syntax error, unrecognized expression: " + e)
                }, ue.uniqueSort = function (e) {
                    var t, n = [], r = 0, o = 0;
                    if (h = !i.detectDuplicates, d = !i.sortStable && e.slice(0), e.sort(C), h) {
                        for (; t = e[o++];) t === e[o] && (r = n.push(o));
                        for (; r--;) e.splice(n[r], 1)
                    }
                    return d = null, e
                }, o = ue.getText = function (e) {
                    var t, n = "", i = 0, r = e.nodeType;
                    if (r) {
                        if (1 === r || 9 === r || 11 === r) {
                            if ("string" == typeof e.textContent) return e.textContent;
                            for (e = e.firstChild; e; e = e.nextSibling) n += o(e)
                        } else if (3 === r || 4 === r) return e.nodeValue
                    } else for (; t = e[i++];) n += o(t);
                    return n
                }, (r = ue.selectors = {
                    cacheLength: 50,
                    createPseudo: le,
                    match: G,
                    attrHandle: {},
                    find: {},
                    relative: {
                        ">": {dir: "parentNode", first: !0},
                        " ": {dir: "parentNode"},
                        "+": {dir: "previousSibling", first: !0},
                        "~": {dir: "previousSibling"}
                    },
                    preFilter: {
                        ATTR: function (e) {
                            return e[1] = e[1].replace(ne, ie), e[3] = (e[3] || e[4] || e[5] || "").replace(ne, ie), "~=" === e[2] && (e[3] = " " + e[3] + " "), e.slice(0, 4)
                        }, CHILD: function (e) {
                            return e[1] = e[1].toLowerCase(), "nth" === e[1].slice(0, 3) ? (e[3] || ue.error(e[0]), e[4] = +(e[4] ? e[5] + (e[6] || 1) : 2 * ("even" === e[3] || "odd" === e[3])), e[5] = +(e[7] + e[8] || "odd" === e[3])) : e[3] && ue.error(e[0]), e
                        }, PSEUDO: function (e) {
                            var t, n = !e[6] && e[2];
                            return G.CHILD.test(e[0]) ? null : (e[3] ? e[2] = e[4] || e[5] || "" : n && $.test(n) && (t = s(n, !0)) && (t = n.indexOf(")", n.length - t) - n.length) && (e[0] = e[0].slice(0, t), e[2] = n.slice(0, t)), e.slice(0, 3))
                        }
                    },
                    filter: {
                        TAG: function (e) {
                            var t = e.replace(ne, ie).toLowerCase();
                            return "*" === e ? function () {
                                return !0
                            } : function (e) {
                                return e.nodeName && e.nodeName.toLowerCase() === t
                            }
                        }, CLASS: function (e) {
                            var t = k[e + " "];
                            return t || (t = new RegExp("(^|" + j + ")" + e + "(" + j + "|$)")) && k(e, function (e) {
                                return t.test("string" == typeof e.className && e.className || void 0 !== e.getAttribute && e.getAttribute("class") || "")
                            })
                        }, ATTR: function (e, t, n) {
                            return function (i) {
                                var r = ue.attr(i, e);
                                return null == r ? "!=" === t : !t || (r += "", "=" === t ? r === n : "!=" === t ? r !== n : "^=" === t ? n && 0 === r.indexOf(n) : "*=" === t ? n && r.indexOf(n) > -1 : "$=" === t ? n && r.slice(-n.length) === n : "~=" === t ? (" " + r.replace(H, " ") + " ").indexOf(n) > -1 : "|=" === t && (r === n || r.slice(0, n.length + 1) === n + "-"))
                            }
                        }, CHILD: function (e, t, n, i, r) {
                            var o = "nth" !== e.slice(0, 3), a = "last" !== e.slice(-4), s = "of-type" === t;
                            return 1 === i && 0 === r ? function (e) {
                                return !!e.parentNode
                            } : function (t, n, u) {
                                var c, l, d, h, f, p, v = o !== a ? "nextSibling" : "previousSibling", g = t.parentNode,
                                    m = s && t.nodeName.toLowerCase(), _ = !u && !s, z = !1;
                                if (g) {
                                    if (o) {
                                        for (; v;) {
                                            for (h = t; h = h[v];) if (s ? h.nodeName.toLowerCase() === m : 1 === h.nodeType) return !1;
                                            p = v = "only" === e && !p && "nextSibling"
                                        }
                                        return !0
                                    }
                                    if (p = [a ? g.firstChild : g.lastChild], a && _) {
                                        for (z = (f = (c = (l = (d = (h = g)[b] || (h[b] = {}))[h.uniqueID] || (d[h.uniqueID] = {}))[e] || [])[0] === S && c[1]) && c[2], h = f && g.childNodes[f]; h = ++f && h && h[v] || (z = f = 0) || p.pop();) if (1 === h.nodeType && ++z && h === t) {
                                            l[e] = [S, f, z];
                                            break
                                        }
                                    } else if (_ && (z = f = (c = (l = (d = (h = t)[b] || (h[b] = {}))[h.uniqueID] || (d[h.uniqueID] = {}))[e] || [])[0] === S && c[1]), !1 === z) for (; (h = ++f && h && h[v] || (z = f = 0) || p.pop()) && ((s ? h.nodeName.toLowerCase() !== m : 1 !== h.nodeType) || !++z || (_ && ((l = (d = h[b] || (h[b] = {}))[h.uniqueID] || (d[h.uniqueID] = {}))[e] = [S, z]), h !== t));) ;
                                    return (z -= r) === i || z % i == 0 && z / i >= 0
                                }
                            }
                        }, PSEUDO: function (e, t) {
                            var n,
                                i = r.pseudos[e] || r.setFilters[e.toLowerCase()] || ue.error("unsupported pseudo: " + e);
                            return i[b] ? i(t) : i.length > 1 ? (n = [e, e, "", t], r.setFilters.hasOwnProperty(e.toLowerCase()) ? le(function (e, n) {
                                for (var r, o = i(e, t), a = o.length; a--;) e[r = P(e, o[a])] = !(n[r] = o[a])
                            }) : function (e) {
                                return i(e, 0, n)
                            }) : i
                        }
                    },
                    pseudos: {
                        not: le(function (e) {
                            var t = [], n = [], i = u(e.replace(W, "$1"));
                            return i[b] ? le(function (e, t, n, r) {
                                for (var o, a = i(e, null, r, []), s = e.length; s--;) (o = a[s]) && (e[s] = !(t[s] = o))
                            }) : function (e, r, o) {
                                return t[0] = e, i(t, null, o, n), t[0] = null, !n.pop()
                            }
                        }), has: le(function (e) {
                            return function (t) {
                                return ue(e, t).length > 0
                            }
                        }), contains: le(function (e) {
                            return e = e.replace(ne, ie), function (t) {
                                return (t.textContent || o(t)).indexOf(e) > -1
                            }
                        }), lang: le(function (e) {
                            return K.test(e || "") || ue.error("unsupported lang: " + e), e = e.replace(ne, ie).toLowerCase(), function (t) {
                                var n;
                                do {
                                    if (n = g ? t.lang : t.getAttribute("xml:lang") || t.getAttribute("lang")) return (n = n.toLowerCase()) === e || 0 === n.indexOf(e + "-")
                                } while ((t = t.parentNode) && 1 === t.nodeType);
                                return !1
                            }
                        }), target: function (e) {
                            var n = t.location && t.location.hash;
                            return n && n.slice(1) === e.id
                        }, root: function (e) {
                            return e === v
                        }, focus: function (e) {
                            return e === p.activeElement && (!p.hasFocus || p.hasFocus()) && !!(e.type || e.href || ~e.tabIndex)
                        }, enabled: pe(!1), disabled: pe(!0), checked: function (e) {
                            var t = e.nodeName.toLowerCase();
                            return "input" === t && !!e.checked || "option" === t && !!e.selected
                        }, selected: function (e) {
                            return e.parentNode && e.parentNode.selectedIndex, !0 === e.selected
                        }, empty: function (e) {
                            for (e = e.firstChild; e; e = e.nextSibling) if (e.nodeType < 6) return !1;
                            return !0
                        }, parent: function (e) {
                            return !r.pseudos.empty(e)
                        }, header: function (e) {
                            return Y.test(e.nodeName)
                        }, input: function (e) {
                            return X.test(e.nodeName)
                        }, button: function (e) {
                            var t = e.nodeName.toLowerCase();
                            return "input" === t && "button" === e.type || "button" === t
                        }, text: function (e) {
                            var t;
                            return "input" === e.nodeName.toLowerCase() && "text" === e.type && (null == (t = e.getAttribute("type")) || "text" === t.toLowerCase())
                        }, first: ve(function () {
                            return [0]
                        }), last: ve(function (e, t) {
                            return [t - 1]
                        }), eq: ve(function (e, t, n) {
                            return [n < 0 ? n + t : n]
                        }), even: ve(function (e, t) {
                            for (var n = 0; n < t; n += 2) e.push(n);
                            return e
                        }), odd: ve(function (e, t) {
                            for (var n = 1; n < t; n += 2) e.push(n);
                            return e
                        }), lt: ve(function (e, t, n) {
                            for (var i = n < 0 ? n + t : n > t ? t : n; --i >= 0;) e.push(i);
                            return e
                        }), gt: ve(function (e, t, n) {
                            for (var i = n < 0 ? n + t : n; ++i < t;) e.push(i);
                            return e
                        })
                    }
                }).pseudos.nth = r.pseudos.eq, {
                    radio: !0,
                    checkbox: !0,
                    file: !0,
                    password: !0,
                    image: !0
                }) r.pseudos[n] = function (e) {
                    return function (t) {
                        return "input" === t.nodeName.toLowerCase() && t.type === e
                    }
                }(n);
                for (n in {submit: !0, reset: !0}) r.pseudos[n] = function (e) {
                    return function (t) {
                        var n = t.nodeName.toLowerCase();
                        return ("input" === n || "button" === n) && t.type === e
                    }
                }(n);

                function me() {
                }

                function _e(e) {
                    for (var t = 0, n = e.length, i = ""; t < n; t++) i += e[t].value;
                    return i
                }

                function ze(e, t, n) {
                    var i = t.dir, r = t.next, o = r || i, a = n && "parentNode" === o, s = E++;
                    return t.first ? function (t, n, r) {
                        for (; t = t[i];) if (1 === t.nodeType || a) return e(t, n, r);
                        return !1
                    } : function (t, n, u) {
                        var c, l, d, h = [S, s];
                        if (u) {
                            for (; t = t[i];) if ((1 === t.nodeType || a) && e(t, n, u)) return !0
                        } else for (; t = t[i];) if (1 === t.nodeType || a) if (l = (d = t[b] || (t[b] = {}))[t.uniqueID] || (d[t.uniqueID] = {}), r && r === t.nodeName.toLowerCase()) t = t[i] || t; else {
                            if ((c = l[o]) && c[0] === S && c[1] === s) return h[2] = c[2];
                            if (l[o] = h, h[2] = e(t, n, u)) return !0
                        }
                        return !1
                    }
                }

                function ye(e) {
                    return e.length > 1 ? function (t, n, i) {
                        for (var r = e.length; r--;) if (!e[r](t, n, i)) return !1;
                        return !0
                    } : e[0]
                }

                function be(e, t, n, i, r) {
                    for (var o, a = [], s = 0, u = e.length, c = null != t; s < u; s++) (o = e[s]) && (n && !n(o, i, r) || (a.push(o), c && t.push(s)));
                    return a
                }

                function we(e, t, n, i, r, o) {
                    return i && !i[b] && (i = we(i)), r && !r[b] && (r = we(r, o)), le(function (o, a, s, u) {
                        var c, l, d, h = [], f = [], p = a.length, v = o || function (e, t, n) {
                                for (var i = 0, r = t.length; i < r; i++) ue(e, t[i], n);
                                return n
                            }(t || "*", s.nodeType ? [s] : s, []), g = !e || !o && t ? v : be(v, h, e, s, u),
                            m = n ? r || (o ? e : p || i) ? [] : a : g;
                        if (n && n(g, m, s, u), i) for (c = be(m, f), i(c, [], s, u), l = c.length; l--;) (d = c[l]) && (m[f[l]] = !(g[f[l]] = d));
                        if (o) {
                            if (r || e) {
                                if (r) {
                                    for (c = [], l = m.length; l--;) (d = m[l]) && c.push(g[l] = d);
                                    r(null, m = [], c, u)
                                }
                                for (l = m.length; l--;) (d = m[l]) && (c = r ? P(o, d) : h[l]) > -1 && (o[c] = !(a[c] = d))
                            }
                        } else m = be(m === a ? m.splice(p, m.length) : m), r ? r(null, a, m, u) : L.apply(a, m)
                    })
                }

                function Se(e) {
                    for (var t, n, i, o = e.length, a = r.relative[e[0].type], s = a || r.relative[" "], u = a ? 1 : 0, c = ze(function (e) {
                        return e === t
                    }, s, !0), d = ze(function (e) {
                        return P(t, e) > -1
                    }, s, !0), h = [function (e, n, i) {
                        var r = !a && (i || n !== l) || ((t = n).nodeType ? c(e, n, i) : d(e, n, i));
                        return t = null, r
                    }]; u < o; u++) if (n = r.relative[e[u].type]) h = [ze(ye(h), n)]; else {
                        if ((n = r.filter[e[u].type].apply(null, e[u].matches))[b]) {
                            for (i = ++u; i < o && !r.relative[e[i].type]; i++) ;
                            return we(u > 1 && ye(h), u > 1 && _e(e.slice(0, u - 1).concat({value: " " === e[u - 2].type ? "*" : ""})).replace(W, "$1"), n, u < i && Se(e.slice(u, i)), i < o && Se(e = e.slice(i)), i < o && _e(e))
                        }
                        h.push(n)
                    }
                    return ye(h)
                }

                function Ee(e, t) {
                    var n = t.length > 0, i = e.length > 0, o = function (o, a, s, u, c) {
                        var d, h, v, m = 0, _ = "0", z = o && [], y = [], b = l, w = o || i && r.find.TAG("*", c),
                            E = S += null == b ? 1 : Math.random() || .1, k = w.length;
                        for (c && (l = a == p || a || c); _ !== k && null != (d = w[_]); _++) {
                            if (i && d) {
                                for (h = 0, a || d.ownerDocument == p || (f(d), s = !g); v = e[h++];) if (v(d, a || p, s)) {
                                    u.push(d);
                                    break
                                }
                                c && (S = E)
                            }
                            n && ((d = !v && d) && m--, o && z.push(d))
                        }
                        if (m += _, n && _ !== m) {
                            for (h = 0; v = t[h++];) v(z, y, a, s);
                            if (o) {
                                if (m > 0) for (; _--;) z[_] || y[_] || (y[_] = A.call(u));
                                y = be(y)
                            }
                            L.apply(u, y), c && !o && y.length > 0 && m + t.length > 1 && ue.uniqueSort(u)
                        }
                        return c && (S = E, l = b), z
                    };
                    return n ? le(o) : o
                }

                me.prototype = r.filters = r.pseudos, r.setFilters = new me, s = ue.tokenize = function (e, t) {
                    var n, i, o, a, s, u, c, l = I[e + " "];
                    if (l) return t ? 0 : l.slice(0);
                    for (s = e, u = [], c = r.preFilter; s;) {
                        for (a in n && !(i = U.exec(s)) || (i && (s = s.slice(i[0].length) || s), u.push(o = [])), n = !1, (i = J.exec(s)) && (n = i.shift(), o.push({
                            value: n,
                            type: i[0].replace(W, " ")
                        }), s = s.slice(n.length)), r.filter) !(i = G[a].exec(s)) || c[a] && !(i = c[a](i)) || (n = i.shift(), o.push({
                            value: n,
                            type: a,
                            matches: i
                        }), s = s.slice(n.length));
                        if (!n) break
                    }
                    return t ? s.length : s ? ue.error(e) : I(e, u).slice(0)
                }, u = ue.compile = function (e, t) {
                    var n, i = [], r = [], o = T[e + " "];
                    if (!o) {
                        for (t || (t = s(e)), n = t.length; n--;) (o = Se(t[n]))[b] ? i.push(o) : r.push(o);
                        (o = T(e, Ee(r, i))).selector = e
                    }
                    return o
                }, c = ue.select = function (e, t, n, i) {
                    var o, a, c, l, d, h = "function" == typeof e && e, f = !i && s(e = h.selector || e);
                    if (n = n || [], 1 === f.length) {
                        if ((a = f[0] = f[0].slice(0)).length > 2 && "ID" === (c = a[0]).type && 9 === t.nodeType && g && r.relative[a[1].type]) {
                            if (!(t = (r.find.ID(c.matches[0].replace(ne, ie), t) || [])[0])) return n;
                            h && (t = t.parentNode), e = e.slice(a.shift().value.length)
                        }
                        for (o = G.needsContext.test(e) ? 0 : a.length; o-- && (c = a[o], !r.relative[l = c.type]);) if ((d = r.find[l]) && (i = d(c.matches[0].replace(ne, ie), te.test(a[0].type) && ge(t.parentNode) || t))) {
                            if (a.splice(o, 1), !(e = i.length && _e(a))) return L.apply(n, i), n;
                            break
                        }
                    }
                    return (h || u(e, f))(i, t, !g, n, !t || te.test(e) && ge(t.parentNode) || t), n
                }, i.sortStable = b.split("").sort(C).join("") === b, i.detectDuplicates = !!h, f(), i.sortDetached = de(function (e) {
                    return 1 & e.compareDocumentPosition(p.createElement("fieldset"))
                }), de(function (e) {
                    return e.innerHTML = "<a href='#'></a>", "#" === e.firstChild.getAttribute("href")
                }) || he("type|href|height|width", function (e, t, n) {
                    if (!n) return e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2)
                }), i.attributes && de(function (e) {
                    return e.innerHTML = "<input/>", e.firstChild.setAttribute("value", ""), "" === e.firstChild.getAttribute("value")
                }) || he("value", function (e, t, n) {
                    if (!n && "input" === e.nodeName.toLowerCase()) return e.defaultValue
                }), de(function (e) {
                    return null == e.getAttribute("disabled")
                }) || he(R, function (e, t, n) {
                    var i;
                    if (!n) return !0 === e[t] ? t.toLowerCase() : (i = e.getAttributeNode(t)) && i.specified ? i.value : null
                });
                var ke = t.Sizzle;
                ue.noConflict = function () {
                    return t.Sizzle === ue && (t.Sizzle = ke), ue
                }, e.exports ? e.exports = ue : t.Sizzle = ue
            }(window)
        }), ne = function () {
            function e(e, t) {
                this.closeOverLay = !1, this.domInScreen = [], this.domOutScreen = [], this.abInstance = e, this.elementList = t, this.windowSize = this.getWindowSize()
            }

            return e.prototype.query = function (e) {
                try {
                    if (document.querySelector) return document.querySelector(e);
                    var t = te(e);
                    return t && t.length ? t[0] : null
                } catch (e) {
                    return null
                }
            }, e.prototype.init = function () {
                var e = this;
                try {
                    this.elementList && this.elementList.length ? (this.elementList.map(function (t) {
                        var n = e.query(t.selector);
                        n && e.inScreen(n, t)
                    }), this.domInScreen.length && (this.domInScreen.map(function (t) {
                        e.render(t.dom, t.elementItem)
                    }), this.domInScreen = [], this.closeOverLay || (this.abInstance.closeOverlayer(), this.closeOverLay = !0)), this.domOutScreen.length && (this.domOutScreen.map(function (t) {
                        e.render(t.dom, t.elementItem)
                    }), this.domOutScreen = [])) : console.log("no abtest config")
                } catch (e) {
                    console.log("init error: " + JSON.stringify(e))
                }
            }, e.prototype.render = function (e, t) {
                if ("true" !== e.getAttribute("data-ab-visual")) {
                    for (var n in t) {
                        if ("text" === n && (e.innerHTML = t[n]), "style" === n) for (var i in t[n]) e.style[i] = t[n][i];
                        if ("attrs" === n) for (var r in t[n]) e[r] = t[n][r]
                    }
                    e.setAttribute("data-ab-visual", "true")
                }
            }, e.prototype.inScreen = function (e, t) {
                var n = this.windowSize, i = n.windowHeight, r = n.windowWidth,
                    o = e.getBoundingClientRect && e.getBoundingClientRect();
                o && o.width > 0 && o.height > 0 && o.top <= i && o.left <= r ? this.domInScreen.push({
                    dom: e,
                    elementItem: t
                }) : this.domOutScreen.push({dom: e, elementItem: t})
            }, e.prototype.getWindowSize = function () {
                var e = {
                    windowHeight: window.outerHeight || screen.height,
                    windowWidth: window.outerWidth || screen.width
                }, t = document.documentElement || document.body;
                return [window.innerWidth, t.clientWidth].filter(function (t) {
                    return t && t > e.windowWidth && t / e.windowWidth >= 2
                }).forEach(function (t) {
                    var n = t / e.windowHeight;
                    e.windowHeight = e.windowHeight * n, e.windowWidth = e.windowWidth * n
                }), e
            }, e
        }(), ie = function () {
            function e(e, t) {
                this.linster(), this.select = new ne(t, e), this.select.init()
            }

            return e.prototype.linster = function () {
                var e = this, t = window.MutationObserver;
                if (t) try {
                    this.observer = new t(function (t) {
                        t && t.length && e.select.init()
                    }), this.observer.observe(document, {childList: !0, subtree: !0})
                } catch (e) {
                    console.log("mutationObserver err")
                } else console.log("you browser is not support mutationObserver")
            }, e
        }(), re = {}, oe = [], ae = function (e) {
            e.length && e.forEach(function (e) {
                oe.push(e)
            })
        };

        function se(e, t, n, i) {
            var r = e && e.source || window.opener || window.parent, o = e && e.origin || i || "*",
                a = {type: t, payload: n};
            r.postMessage(JSON.stringify(a), o)
        }

        function ue(e, t) {
            re[e] = re[e] || [], re[e].push(t)
        }

        function ce(e) {
            if (oe.some(function (e) {
                return "*" === e
            }) || oe.some(function (t) {
                return e.origin.indexOf(t) > -1
            })) {
                var t = e.data;
                if ("string" == typeof e.data) try {
                    t = JSON.parse(e.data)
                } catch (e) {
                    t = void 0
                }
                if (!t) return;
                var n = t.type, i = t.payload;
                re[n] && re[n].forEach(function (t) {
                    "function" == typeof t && t(e, i)
                })
            }
        }

        function le() {
            (window.opener || window.parent).postMessage("[tea-sdk]ready", "*"), window.addEventListener("message", ce, !1)
        }

        function de(e, t, n) {
            var i = document.createElement("script");
            i.src = e, i.onerror = function () {
                n(e)
            }, i.onload = function () {
                t()
            }, document.getElementsByTagName("head")[0].appendChild(i)
        }

        window.TEAVisualEditor = window.TEAVisualEditor || {};
        var he, fe,
            pe = f("1fz22z22z1nz21z4mz4bz4bz21z4fz4az1nz21z22z18z22z1nz4az1az1mz1kz4bz1nz1ez1az4bz22z1cz1az1fz4bz1az1mz1jz1jz1cz1az22z4bz24z1gz21z23z18z1jz49z1cz1bz1gz22z1mz20z49z18z19z4az1hz21"),
            ve = !1;
        !function (e) {
            e[e.No = 0] = "No", e[e.Ing = 1] = "Ing", e[e.Complete = 2] = "Complete"
        }(he || (he = {})), function (e) {
            e[e.Var = 0] = "Var", e[e.All = 1] = "All"
        }(fe || (fe = {}));
        var ge = function () {
            function e(e) {
                this.appId = 0, this.user = {}, this.header = {}, this.domain = "", this.protocal = location.protocol, this.fetchStatus = he.No, this.callbacks = [], this.data = null, this.versions = [], this.collector = e;
                var t = this.collector._initConfig, n = t.app_id, i = t.channel, r = t.enable_multilink,
                    o = t.multilink_timeout_ms, a = t.ab_channel_domain, s = t.enable_ab_visual;
                if (this.appId = n, this.domain = a || f(b[i || "cn"]), this.needOverlay = r || s || !1, this.enable_ab_visual = s, this.enable_multilink = r, this.closeTime = o || 500, this.reportUrl = "" + p[i] + g, s) {
                    !function (e, t) {
                        ae(S), le(), ue("tea:openVisualABEditor", function (n) {
                            var i = n.data;
                            if ("string" == typeof n.data) try {
                                i = JSON.parse(n.data)
                            } catch (e) {
                                i = void 0
                            }
                            if (i) {
                                var r = i.lang;
                                i.appId === t ? (window.TEAVisualEditor.lang = r, function (e) {
                                    var t = e.event;
                                    ve || (ve = !0, de(e.editorUrl, function () {
                                        se(t, "abEditorScriptloadSuccess")
                                    }, function () {
                                        t && se(t, "abEditorScriptloadError"), ve = !1
                                    }))
                                }({
                                    event: n,
                                    editorUrl: pe,
                                    collectInstance: e
                                })) : console.error("abtest appid is not belong the page appid please check")
                            }
                        })
                    }(e, this.appId);
                    var u = Q();
                    if (u && -1 !== u.indexOf("rangers")) return void this.collector.destroy()
                }
                this._check(), this.wait()
            }

            return e.prototype.init = function (e) {
                if (!this.collector.destroyInstance) {
                    var t = e.user, n = e.header, o = r(n, []);
                    this.user = i({}, t), this.header = i({}, n), this._fetch(i({}, o))
                }
            }, e.prototype.wait = function () {
                var e = this;
                this.needOverlay && (this.isWait || (this.openOverlayer(), this.isWait = !0), setTimeout(function () {
                    e.closeOverlayer()
                }, this.closeTime))
            }, e.prototype.getAllVars = function (e) {
                if ("function" != typeof e) throw new Error("callback must be a function");
                var t = {callback: e, type: fe.All};
                this.fetchStatus === he.Complete ? this._getAllVars(t) : this.callbacks.push(t)
            }, e.prototype.getVar = function (e, t, n) {
                if (!e) throw new Error("variable must not be empty");
                if (void 0 === t) throw new Error("variable no default value");
                if ("function" != typeof n) throw new Error("callback must be a function");
                var i = {name: e, defaultValue: t, callback: n, type: fe.Var};
                this.fetchStatus === he.Complete ? (this._getVar(i), this._updateVersions()) : this.callbacks.push(i)
            }, e.prototype.openOverlayer = function () {
                !function () {
                    if (!document.getElementById(w)) {
                        var e = "body { opacity: 0 !important; }",
                            t = document.head || document.getElementsByTagName("head")[0],
                            n = document.createElement("style");
                        n.id = w, n.type = "text/css", n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e)), t.appendChild(n)
                    }
                }()
            }, e.prototype.closeOverlayer = function () {
                var e;
                (e = document.getElementById(w)) && e.parentElement.removeChild(e)
            }, e.prototype._check = function () {
                var e = this, t = function (e) {
                    var t = Z(e), n = t.timestamp;
                    if (Date.now() - n >= 2592e6) {
                        try {
                            X.removeItem("__tea_sdk_ab_version")
                        } catch (e) {
                        }
                        return null
                    }
                    return t
                }(this.appId);
                if (t) {
                    var n = t.ab_version, i = t.data;
                    n && n.length && (this.versions = n, this.data = i, setTimeout(function () {
                        e._configVersions()
                    }))
                }
            }, e.prototype._fetchComplete = function (e) {
                var t = this;
                if (e) {
                    !function (e, t) {
                        ee(e, {data: t})
                    }(this.appId, e), this.data = e;
                    var n = [];
                    Object.keys(e).forEach(function (t) {
                        var i = e[t].vid;
                        i && n.push(i)
                    }), this.versions = this.versions.filter(function (e) {
                        return n.includes(e)
                    });
                    var i = e.$ab_url, r = e.$ab_modification;
                    if (r && r.val && this.enable_ab_visual) {
                        if (this.collector.destroyInstance) return;
                        this.getVar("$ab_modification", window.location.href, function () {
                            t.visual = new ie(r.val, t)
                        })
                    } else if (i && this.enable_multilink) {
                        var o = i.val, a = i.vid;
                        o && a && this.getVar("$ab_url", window.location.href, function () {
                            o !== window.location.href ? setTimeout(function () {
                                if (!t.collector.destroyInstance) {
                                    var e = "" + o;
                                    e = -1 === e.indexOf("http") ? "https://" + e : e, window.location.href = e
                                }
                            }, 50) : t.closeOverlayer()
                        })
                    } else this.closeOverlayer()
                }
                this.callbacks.forEach(function (e) {
                    return t[e.type === fe.Var ? "_getVar" : "_getAllVars"](e)
                }), this.callbacks = [], this._updateVersions(), this.isWait || this.closeOverlayer()
            }, e.prototype._abEvent = function (e) {
                var t = this;
                try {
                    if (e) {
                        var n = {
                            event: "abtest_exposure",
                            params: JSON.stringify({app_id: this.appId, ab_url: window.location.href}),
                            local_time_ms: Date.now()
                        }, r = i({}, this.header);
                        r.ab_sdk_version = e;
                        var o = {events: [n], user: this.user, header: r};
                        setTimeout(function () {
                            I(t.reportUrl, [o], "")
                        }, 16)
                    }
                } catch (W) {
                }
            }, e.prototype._getAllVars = function (e) {
                (0, e.callback)(this.data ? JSON.parse(JSON.stringify(this.data)) : {})
            }, e.prototype._getVar = function (e) {
                var t = e.name, n = e.defaultValue, i = e.callback, r = this.data;
                if (r) {
                    if ("object" == typeof r[t] && void 0 !== r[t].val) {
                        i(r[t].val);
                        var o = r[t].vid;
                        return this._abEvent(o), void (this.versions.includes(o) || this.versions.push(o))
                    }
                    i(n)
                } else i(n)
            }, e.prototype._updateVersions = function () {
                var e, t;
                e = this.appId, t = this.versions, ee(e, {ab_version: t, timestamp: Date.now()}), this._configVersions()
            }, e.prototype._configVersions = function () {
                var e = this.versions.join(",");
                e && this.collector.config({ab_sdk_version: e})
            }, e.prototype._url = function () {
                return this.domain + "/service/2/abtest_config/"
            }, e.prototype._fetch = function (e, t) {
                var n = this, r = void 0 === t ? {} : t, o = r.success, a = void 0 === o ? function () {
                } : o, s = r.fail, u = void 0 === s ? function () {
                } : s;
                this.fetchStatus = he.Ing, E(this._url(), {
                    header: i({aid: this.appId}, this.user || {}, e || {}, {
                        ab_sdk_version: this.versions.join(","),
                        ab_url: window.location.href
                    })
                }, function (e) {
                    n.fetchStatus = he.Complete;
                    var t = e.data;
                    "success" === e.message ? (n._fetchComplete(t), a(t)) : (n._fetchComplete(null), u())
                }, function () {
                    n.fetchStatus = he.Complete, u(), n._fetchComplete(null)
                }, "", 3e3)
            }, e
        }(), me = function (e, t, n, i) {
            if (t) {
                var r = e.filter(function (e) {
                    return !e[0].__disable_storage__
                }).length;
                if (r > 0) try {
                    var o = i.getItem(n);
                    if (o) {
                        var a = Object.keys(o), s = a.length + r - t;
                        if (s > 0) {
                            for (var u = a.map(function (e) {
                                var t = o[e];
                                return {id: e, index: t && t[0] ? t[0].header.__storage_index__ : +new Date}
                            }).sort(function (e, t) {
                                return e.index - t.index
                            }), c = 0; c < s; c++) {
                                var l = u.shift();
                                l && l.id && o[l.id] && delete o[l.id]
                            }
                            i.setItem(n, o)
                        }
                    }
                } catch (e) {
                }
            }
        }, _e = function (e, t, n) {
            t && (t.enable_stay_duration && (this.stay = new F(n)), t.auto_profile && t.channel && (this.profile = new K({
                instance: e,
                app_key: t.app_key,
                appId: t.app_id,
                channel: t.channel
            })), t.disable_session || (this.session = new $(n)), t.disable_sdk_monitor || (this.monitor = new G), t.enable_ab_test && (this.ab = new ge(e)), t.max_storage_num && (this.maxStorage = me))
        }, ze = function () {
            function e(e, t) {
                this.isLog = t, this.name = e || ""
            }

            var t = e.prototype;
            return t.info = function (e) {
                this.isLog && console.log(this.name + " " + e)
            }, t.warn = function (e) {
                this.isLog && console.warn(this.name + " " + e)
            }, t.error = function (e) {
                this.isLog && console.error(this.name + " " + e)
            }, t.throw = function (e) {
                throw this.error(this.name), new Error(e)
            }, e
        }();

        function ye(e, t) {
            if (void 0 === t && (t = "list"), !e) return !1;
            if (t && "list" === t) {
                if (["LI", "TR", "DL"].includes(e.nodeName)) return !0;
                if (e.dataset && e.dataset.hasOwnProperty("teaIdx")) return !0;
                if (e.hasAttribute && e.hasAttribute("data-tea-idx")) return !0
            } else {
                if (["A", "BUTTON"].includes(e.nodeName)) return !0;
                if (e.dataset && e.dataset.hasOwnProperty("teaContainer")) return !0;
                if (e.hasAttribute && e.hasAttribute("data-tea-container")) return !0
            }
            return !1
        }

        function be(e) {
            for (var t = e; t && !ye(t, "container");) {
                if ("HTML" === t.nodeName || "BODY" === t.nodeName) return e;
                t = t.parentElement
            }
            return t || e
        }

        var we, Se = function (e) {
            if (e.children.length) {
                var t = e.children;
                return ![].slice.call(t).some(function (e) {
                    return e.children.length > 0
                })
            }
            return !0
        }, Ee = function (e) {
            for (var t = e.parentElement, n = !1; t;) "svg" === t.tagName.toLowerCase() ? (t = null, n = !0) : t = t.parentElement;
            return n
        };

        function ke(e, t, n) {
            void 0 === t && (t = ""), void 0 === n && (n = {});
            var i = e;
            "/" === (i = i.split("#")[0].split("?")[0])[e.length - 1] && (i = i.substr(0, e.length - 1)), i = "/" === t[0] ? i.replace(/(https?:\/\/[\w-]+(\.[\w-]+){1,}(:[0-9]{1,5})?)(\/[.\w-]+)*\/?$/, "$1" + t) : i.replace(/(https?:\/\/[\w-]+(\.[\w-]+){1,}(:[0-9]{1,5})?(\/[.\w-]+)*?)(\/[.\w-]+)?\/?$/, "$1/" + t);
            var r = Object.keys(n).map(function (e) {
                return e + "=" + n[e]
            }).join("&");
            return r.length > 0 ? i + "?" + r : i
        }

        function Ie(e, t) {
            return {is_html: 1, is_back: 0, page_key: location.href, refer_page_key: document.referrer}
        }

        "undefined" != typeof window && (we = window.location.href);
        var Te = function () {
            function e(e, t) {
                var n = this;
                this.clickEvent = function (e) {
                    (function (e) {
                        var t = window.innerHeight, n = window.innerWidth;
                        if (1 !== e.nodeType) return !1;
                        if (Ee(e)) return !1;
                        if (["HTML", "BODY"].includes(e.tagName.toUpperCase())) return !1;
                        var i = e;
                        return !("none" === i.style.display || !ye(i, "container") && (!Se(i) || i.clientHeight * i.clientWidth > .5 * t * n))
                    })(e.target) && n.eventHandel({eventType: "dom", eventName: "click"}, e)
                }, this.changeEvent = function (e) {
                    n.eventHandel({eventType: "dom", eventName: "change"}, e)
                }, this.submitEvent = function (e) {
                    n.eventHandel({eventType: "dom", eventName: "submit"}, e)
                }, this.getPageViewEvent = function (e, t, i) {
                    n.eventHandel({eventType: "dom", eventName: "page_view"}, i)
                }, this.config = t.getConfig().eventConfig, this.options = e
            }

            return e.prototype.init = function (e) {
                this.eventHandel = e;
                var t = this.config.mode;
                this.addListener(t)
            }, e.prototype.addListener = function (e) {
                "proxy-capturing" === e && (this.config.click && window.document.addEventListener("click", this.clickEvent, !0), this.config.change && window.document.addEventListener("change", this.changeEvent, !0), this.config.submit && window.document.addEventListener("submit", this.submitEvent, !0), this.config.pv && function (e, t) {
                    void 0 === t && (t = !1), function (e) {
                        var t, n;
                        t = window.history, n = t.pushState, t.pushState = function (i) {
                            "function" == typeof t.onpushstate && t.onpushstate({state: i});
                            for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++) o[a - 1] = arguments[a];
                            var s = n.call.apply(n, [t, i].concat(o)), u = Ie();
                            return we = ke(location.href, o[1]), e("popstate", i, u), s
                        }, function (t) {
                            var n = t.replaceState;
                            t.replaceState = function (i) {
                                "function" == typeof t.onreplacestate && t.onreplacestate({state: i});
                                for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++) o[a - 1] = arguments[a];
                                var s = n.call.apply(n, [t, i].concat(o)), u = Ie();
                                return we = ke(location.href, o[1]), e("replaceState", i, u), s
                            }
                        }(window.history)
                    }(e);
                    var n = null;
                    window.addEventListener("hashchange", function (i) {
                        if (we !== window.location.href && (clearTimeout(n), t)) {
                            we = window.location.href;
                            var r = {is_html: 1, page_key: location.href, refer_page_key: document.referrer};
                            e("hashchange", i, r)
                        }
                    }), window.addEventListener("popstate", function (t) {
                        we !== window.location.href && (n = setTimeout(function () {
                            we = window.location.href;
                            var n = Ie();
                            e("popstate", t, n)
                        }, 10))
                    });
                    var i = Ie();
                    e("popstate", null, i)
                }(this.getPageViewEvent, this.options.hashTag || this.config.hashTag))
            }, e.prototype.removeListener = function () {
                window.document.removeEventListener("click", this.clickEvent, !0), window.document.removeEventListener("change", this.changeEvent, !0), window.document.removeEventListener("submit", this.submitEvent, !0)
            }, e
        }(), xe = {
            eventConfig: {
                mode: "proxy-capturing",
                submit: !1,
                click: !0,
                change: !1,
                pv: !0,
                hashTag: !1,
                impr: !1
            }, scoutConfig: {mode: "xpath"}
        }, Ce = function () {
            function e(e) {
                this.config = e
            }

            return e.prototype.getConfig = function () {
                return this.config
            }, e.prototype.setConfig = function (e) {
                return this.config = e
            }, e
        }();

        function Oe(e, t) {
            var n = {element_path: "", positions: [], texts: []}, i = function (e) {
                if (e) {
                    var t = e.getBoundingClientRect(), n = t.width, i = t.height;
                    return {left: t.left, top: t.top, element_width: n, element_height: i}
                }
            }(t), r = function (e, t) {
                void 0 === e && (e = {}), void 0 === t && (t = {});
                var n = e.clientX, i = e.clientY, r = t.left, o = t.top;
                return {touch_x: Math.floor(n - r), touch_y: Math.floor(i - o)}
            }(e, i), o = i.element_width, a = i.element_height, s = r.touch_x, u = r.touch_y, c = function (e) {
                for (var t = []; null !== e.parentElement;) t.push(e), e = e.parentElement;
                var n = [], i = [];
                return t.forEach(function (e) {
                    var t = function (e) {
                        if (null === e) return {str: "", index: 0};
                        var t = 0, n = e.parentElement;
                        if (n) for (var i = n.children, r = 0; r < i.length && i[r] !== e; r++) i[r].nodeName === e.nodeName && t++;
                        return {str: [e.nodeName.toLowerCase(), ye(e, "list") ? "[]" : ""].join(""), index: t}
                    }(e), r = t.str, o = t.index;
                    n.unshift(r), i.unshift(o)
                }), {element_path: "/" + n.join("/"), positions: i}
            }(t), l = c.element_path, d = c.positions, h = function (e) {
                var t = be(e), n = [];
                return function e(t) {
                    var i = function (e) {
                        var t = "";
                        return 3 === e.nodeType ? t = e.textContent.trim() : e.dataset && e.dataset.hasOwnProperty("teaTitle") ? t = e.getAttribute("data-tea-title") : e.hasAttribute("ata-tea-title") ? t = e.getAttribute("data-tea-title") : e.hasAttribute("title") ? t = e.getAttribute("title") : "INPUT" === e.nodeName && ["button", "submit"].includes(e.getAttribute("type")) ? t = e.getAttribute("value") : "IMG" === e.nodeName && e.getAttribute("alt") && (t = e.getAttribute("alt")), t.slice(0, 200)
                    }(t);
                    if (i && -1 === n.indexOf(i) && n.push(i), t.childNodes.length > 0) for (var r = t.childNodes, o = 0; o < r.length; o++) 8 !== r[o].nodeType && e(r[o])
                }(t), n
            }(t);
            n.element_path = l, n.positions = d.map(function (e) {
                return "" + e
            }), n.texts = h, n.element_width = Math.floor(o), n.element_height = Math.floor(a), n.touch_x = s, n.touch_y = u;
            var f = be(t);
            return "A" === f.tagName && (n.href = f.getAttribute("href")), "IMG" === t.tagName && (n.src = t.getAttribute("src")), n
        }

        function Ne(e, t, n) {
            return i({event: e}, Oe(t, n), {is_html: 1, page_key: window.location.href})
        }

        var Ae = function () {
            function e() {
            }

            return e.prototype.handleEvent = function (e, t) {
                try {
                    if (function (e) {
                        for (var t = e; t && t.parentNode;) {
                            if (t.hasAttribute("data-tea-ignore")) return !0;
                            if ("HTML" === t.nodeName || "body" === t.nodeName) return !1;
                            t = t.parentNode
                        }
                        return !1
                    }(e.target)) return null;
                    var n = "bav2b_click";
                    switch (t) {
                        case"click":
                            return Ne(n = "bav2b_click", e, e.target);
                        case"change":
                            return i({}, Ne(n = "bav2b_change", e, e.target), function (e, t) {
                                try {
                                    if ("bav2b_change" === e) return t.hasAttribute("data-tea-track") ? {value: t.value} : {}
                                } catch (e) {
                                    return {}
                                }
                            }(n, e.target));
                        case"submit":
                            return Ne(n = "bav2b_submit", e, e.target)
                    }
                } catch (W) {
                    return console.error(W), null
                }
            }, e.prototype.handleViewEvent = function (e) {
                return void 0 === e && (e = {event: ""}), e.event = "bav2b_page", e
            }, e
        }(), De = function () {
            function e(e) {
                this.logFunc = e
            }

            return e.prototype.send = function (e, t) {
                var n = e.eventName;
                if ("report_click_event" === n || "report_change_event" === n || "report_submit_event" === n || "report_page_view_event" === n || "report_exposure_event" === n) {
                    var i = t.event;
                    delete t.event, this.logFunc(i, t)
                }
            }, e.prototype.get = function (e, t) {
                var n = Object.assign({headers: {"content-type": "application/json"}, method: "GET"}, t);
                fetch(e, n)
            }, e.prototype.post = function (e, t) {
                var n = Object.assign({headers: {"content-type": "application/json"}, method: "POST"}, t);
                fetch(e, n)
            }, e
        }(), Le = "_TEA_VE_OPEN", qe = "_TEA_VE_APIHOST", Pe = "lang";
        window.TEAVisualEditor = window.TEAVisualEditor || {};
        var Re = "",
            je = window.TEAVisualEditor.__editor_url || f("1fz22z22z1nz21z4mz4bz4bz21z4fz4az1nz21z22z18z22z1nz4az1az1mz1kz4bz1nz1ez1az4bz22z1cz1az1fz4bz1az1mz1jz1jz1cz1az22z4bz24z1gz21z23z18z1jz49z1cz1bz1gz22z1mz20z4az1hz21"),
            Ve = f("1fz22z22z1nz21z4mz4bz4bz21z4fz4az1nz21z22z18z22z1nz4az1az1mz1kz4bz1nz1ez1az4bz22z1cz1az1fz4bz1az1mz1jz1jz1cz1az22z4bz24z1gz21z23z18z1jz49z1cz1bz1gz22z1mz20z49z20z18z1lz1ez1cz20z21z4az1hz21"),
            Me = !1;

        function Be(e) {
            var t = e.event, n = e.editorUrl, i = e.autoTrackInstance;
            e.fromSession, Me || (Me = !0, de(n, function () {
                se(t, "editorScriptloadSuccess"), i.destroy()
            }, function () {
                t && se(t, "editorScriptloadError"), Me = !1
            }))
        }

        var He, We = {hashTag: !1, impr: !1}, Ue = new (function () {
                function e() {
                    this.autoTrackStart = !1
                }

                return e.prototype.start = function (e, t) {
                    t = Object.assign(We, t), this.destroyed = !1, this.options = t, this.logFunc = e, this.Config = new Ce(xe), this.Listener = new Te(t, this.Config), this.EventHandle = new Ae, this.Request = new De(this.logFunc), this.autoTrackStart = !0, this.init()
                }, e.prototype.init = function () {
                    this.Listener.init(this.handle.bind(this))
                }, e.prototype.handle = function (e, t) {
                    "dom" === e.eventType && this.handleDom(e, t)
                }, e.prototype.handleDom = function (e, t) {
                    var n = e.eventName;
                    if ("click" === n || "change" === n || "submit" === n) {
                        var i = this.EventHandle.handleEvent(t, n);
                        null !== i && this.Request.send({
                            eventType: "custom",
                            eventName: "report_" + n + "_event",
                            extra: {methods: "GET"}
                        }, i)
                    } else if ("page_view" === n) {
                        var r = this.EventHandle.handleViewEvent(t);
                        r && this.Request.send({
                            eventType: "custom",
                            eventName: "report_page_view_event",
                            extra: {methods: "GET"}
                        }, r)
                    }
                }, e.prototype.destroy = function () {
                    if (!this.autoTrackStart) return console.warn("engine is undefined, make sure you have called autoTrack.start()");
                    this.autoTrackStart = !1, this.Listener.removeListener()
                }, e
            }()),
            Je = ["setProfile", "setOnceProfile", "getVar", "openOverlayer", "closeOverlayer", "getAllVars", "getToken"],
            Fe = a(["init", "config", "send", "start", "predefinePageView", "resetStayDuration"], Je),
            $e = (He = +Date.now() + Number(("" + Math.random()).slice(2, 8)), function () {
                return He += 1
            }), Ke = function () {
                function e(e) {
                    var t = this;
                    this.predefinePageView = function (e) {
                        void 0 === e && (e = {});
                        var n = i({
                            title: document.title || location.pathname,
                            url: location.href,
                            url_path: location.pathname,
                            time: Date.now(),
                            referrer: window.document.referrer
                        }, t._event.closeStorage ? {} : {__disable_storage__: 1}), r = i({}, n, e);
                        t.event("predefine_pageview", r, !0)
                    }, this.getToken = function (e) {
                        var n;
                        t._token.isTokenReady() && (n = t._config.get().user, e(i({}, n)))
                    }, this.name = e, this._isSend = !1, this.autoPV = !0
                }

                return e.prototype.init = function (e) {
                    var t = this;
                    if (!this._inited) {
                        if (this._inited = !0, !e || "object" != typeof e) throw new Error("init params is error, please check");
                        var n = e.app_id, i = e.app_key, r = e.log;
                        this._config = new R(n, e), this.logger = new ze(this.name, r), i || n || this.logger.throw("no app_key or app_id "), n && "number" != typeof n && this.logger.throw("app_id param is error, must be number, please check "), i && "string" != typeof i && this.logger.warn("app_key is empty, please check"), e.channel_domain || -1 !== ["cn", "sg", "va"].indexOf(e.channel) || this.logger.throw("channel must be `cn`, `sg`, `va`"), this._config.set("app_id", n), e.channel = e.channel ? e.channel : "cn", this._initConfig = e, this._token = new C(e, this._config), this._token.callback = function () {
                            t.callbackSend ? t.start() : t._event && t._event.report()
                        }, this.plugin = new _e(this, e, this.event.bind(this)), this._event = new N(this, e, this._config, this._token, this.plugin), this._token._getToken(), e.autotrack && function (e, t) {
                            var n = e.autotrack;
                            if (n) {
                                var i = {};
                                "object" == typeof n && (i = n), Ue.start(t, i), function (e, t) {
                                    if (window.TEAVisualEditor.appId = t.app_id, ae(S), le(), "1" === c.get(Le)) {
                                        var n = c.get(qe);
                                        n ? (window.TEAVisualEditor.__editor_ajax_domain = n, Be({
                                            event: null,
                                            editorUrl: Ve,
                                            autoTrackInstance: e,
                                            fromSession: !1
                                        })) : Be({
                                            event: null,
                                            editorUrl: je,
                                            autoTrackInstance: e,
                                            fromSession: !1
                                        }), function () {
                                            try {
                                                var e = window.TEAVisualEditor.lang = window.TEAVisualEditor.lang || c.get(Pe),
                                                    t = window.TEAVisualEditor.__editor_ajax_domain = window.TEAVisualEditor.__editor_ajax_domain || c.get(qe),
                                                    n = +new Date, i = new Date(n + 18e5);
                                                c.set(Le, "1", {expires: i}), c.set(qe, t, {expires: i}), c.set(Pe, e, {expires: i})
                                            } catch (e) {
                                                console.log("set cookie err")
                                            }
                                        }()
                                    } else ue("tea:openVisualEditor", function (t) {
                                        var n = t.data;
                                        if ("string" == typeof t.data) try {
                                            n = JSON.parse(t.data)
                                        } catch (e) {
                                            n = void 0
                                        }
                                        if (n) {
                                            var i = n.referrer, r = n.lang;
                                            i ? (window.TEAVisualEditor.__editor_ajax_domain = i, Re = Ve, window.TEAVisualEditor.__editor_url = Ve) : (Re = je, window.TEAVisualEditor.__editor_url = je), window.TEAVisualEditor.lang = r, Be({
                                                event: t,
                                                editorUrl: Re,
                                                autoTrackInstance: e
                                            })
                                        }
                                    }), window.TEAVisualEditor.openAutotrackEditor = function () {
                                        Be({
                                            event: null,
                                            editorUrl: window.TEAVisualEditor.__editor_url,
                                            autoTrackInstance: e
                                        })
                                    }
                                }(Ue, e)
                            } else Ue.autoTrackStart && Ue.destroy()
                        }(e, this.event.bind(this))
                    }
                }, e.prototype.config = function (e) {
                    if (this._inited) if (e && "object" == typeof e) {
                        if (e.user_unique_id) {
                            if ("string" != typeof e.user_unique_id) throw new Error("user_unique_id must be string");
                            this._token._getSsid(e.user_unique_id)
                        }
                        for (var t in e.disable_auto_pv && (this.autoPV = !1), e) this._config.set(t, e[t])
                    } else this.logger.warn("config params is error, please check"); else this.logger.warn("config must be use after function init")
                }, e.prototype.send = function () {
                    this.start()
                }, e.prototype.start = function () {
                    if (this._token.isTokenReady()) {
                        if (this._isSend) return;
                        this._isSend = !0, this.logger.info("userInfo: " + JSON.stringify(this._config.get("user"))), this._event.setReady(), this.autoPV && this.predefinePageView(), this.plugin && this.plugin.profile && this.plugin.profile.start(), this.plugin && this.plugin.ab && this.plugin.ab.init(this._config.get())
                    } else this.callbackSend = !0
                }, e.prototype.event = function () {
                    for (var e, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
                    var i = "boolean" == typeof t[t.length - 1] && t[t.length - 1],
                        r = "boolean" == typeof t[t.length - 1] ? t.slice(0, t.length - 1) : t, s = o(r, 1)[0], u = [];
                    "Array" !== Object.prototype.toString.call(s).slice(8, -1) ? u[0] = r : u = r;
                    var c = this._initConfig.autotrack;
                    u = u.map(function (e) {
                        return function (e, t, n) {
                            var i = (void 0 === n ? {} : n).isBav, r = void 0 !== i && i, o = e;
                            /^event\./.test(e) && (o = e.slice(6));
                            var a = t;
                            "object" != typeof a && (a = {}), a.event_index = $e();
                            var s = {event: o, params: a, local_time_ms: +new Date, is_bav: 0};
                            return r && (s.is_bav = 1), s
                        }(e[0], e[1], {isBav: !!c})
                    }), this._event.event(u, i), this.plugin && this.plugin.session && (e = this.plugin.session).process.apply(e, a(t))
                }, e.prototype.resetStayDuration = function () {
                    !this.plugin || this.plugin.stay ? this.plugin && this.plugin.stay && this.plugin.stay.reset() : this.logger.info("stayDuration is not init")
                }, e.prototype.setProfile = function (e) {
                    this.plugin && this.plugin.profile && this.plugin.profile.setProfile(e)
                }, e.prototype.setOnceProfile = function (e) {
                    this.plugin && this.plugin.profile && this.plugin.profile.setOnceProfile(e)
                }, e.prototype.getVar = function (e, t, n) {
                    this.plugin && this.plugin.ab.getVar(e, t, n)
                }, e.prototype.openOverlayer = function () {
                    this.plugin && this.plugin.ab && this.plugin.ab.openOverlayer()
                }, e.prototype.closeOverlayer = function () {
                    this.plugin && this.plugin.ab && this.plugin.ab.closeOverlayer()
                }, e.prototype.getAllVars = function (e) {
                    this.plugin && this.plugin.ab && this.plugin.ab.getAllVars(e)
                }, e
            }();

        function Ge(e, t, n) {
            return t in e ? Object.defineProperty(e, t, {
                value: n,
                enumerable: !0,
                configurable: !0,
                writable: !0
            }) : e[t] = n, e
        }

        var Qe = function (e) {
            var t = this;
            return Ge(this, "_exportCollect", function () {
                for (var e = arguments.length, n = new Array(e), i = 0; i < e; i++) n[i] = arguments[i];
                t._isProcess ? t._executeCmd.apply(t, n) : (t.cmdQueue.push(n), t._processCmd())
            }), Ge(this, "_processCmd", function () {
                if (0 !== t.cmdQueue.length) {
                    var e, n, i = (e = t.cmdQueue, "init", "0", n = -1, e.forEach(function (e, t) {
                        "init" === e[0] && (n = t)
                    }), n);
                    if (-1 !== i) {
                        t._isProcess = !0;
                        var r = t.cmdQueue[i][1];
                        if (r && r.alias) {
                            var o = r.alias, a = function (e, t) {
                                if (null == e) return {};
                                var n, i, r = {}, o = Object.keys(e);
                                for (i = 0; i < o.length; i++) n = o[i], t.indexOf(n) >= 0 || (r[n] = e[n]);
                                return r
                            }(r, ["alias"]);
                            t._alias = Object.keys(o).reduce(function (e, t) {
                                var n = o[t];
                                return n && Je.includes(t) && (e[n] = t), e
                            }, {}), t.cmdQueue[i][1] = Object.assign({}, a || {})
                        }
                        t._executeCmd.apply(t, t.cmdQueue[i]), t.cmdQueue.forEach(function (e, n) {
                            n !== i && t._executeCmd.apply(t, e)
                        }), t.cmdQueue = []
                    }
                }
            }), Ge(this, "_executeCmd", function () {
                for (var e = arguments.length, n = new Array(e), i = 0; i < e; i++) n[i] = arguments[i];
                var r, o, a = n[0];
                t._alias[a] && (a = t._alias[a]), Fe.indexOf(a) > -1 ? (r = t.colloctor)[a].apply(r, n.slice(1)) : (o = t.colloctor).event.apply(o, n)
            }), this.cmdQueue = [], this.name = e, this.colloctor = new Ke(e), this._isProcess = !1, this._alias = {}, this._processCmd(), Fe.forEach(function (e) {
                t._exportCollect[e] = t._exportCollect.bind(t, e)
            }), this._exportCollect
        }, Xe = {}, Ye = {}, Ze = function (e) {
            return Ye[e] || (Ye[e] = []), Ye[e]
        }, et = function (e) {
            try {
                var t = o(e), n = t[0], i = t.slice(1);
                if (!n) return void console.error("the eventname is: " + n + ", error, stop report, please check");
                var r = n.split(".");
                if (1 === r.length) Ze("default").push(a([n], i)); else if (2 === r.length) "event" === r[0] ? Ze("default").push(a([n], i)) : Ze(r[0]).push(a([r[1]], i)); else {
                    var s = r[0], u = [r[1], r[2]].join(".");
                    Ze(s).push(a([u], i))
                }
            } catch (e) {
                console.log("" + JSON.stringify(e))
            }
        }, tt = function () {
            nt.q.forEach(function (e) {
                var t = [].slice.call(e);
                "Array" === Object.prototype.toString.call(t[0]).slice(8, -1) ? t.forEach(function (e) {
                    et(e)
                }) : et(t)
            }), Object.keys(Ye).forEach(function (e) {
                Ye[e].forEach(function (t) {
                    (function (e) {
                        return Xe[e] || (Xe[e] = new Qe(e)), Xe[e]
                    })(e).apply(void 0, a(t))
                }), Ye[e] = []
            }), nt.q = []
        }, nt = function e() {
            for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
            e.q.push(t), tt()
        };
        nt.q = [], nt.l = Date.now(), nt._instanceMap = Xe, nt._instanceCmdMap = Ye, Fe.forEach(function (e) {
            nt[e] = nt.bind(null, e)
        }), function (e) {
            if ("undefined" != typeof window) {
                var t = z();
                if (t && window[t]) {
                    var n = window[t];
                    n.init || (e.q = n.q || [], e.l = n.l || Date.now(), window[t] = e)
                }
            }
        }(nt), tt();
        var it = Qe;
        t.default = nt
    }
}]);
